-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (41 loc) · 1.33 KB
/
dockerhub.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Push to Dockerhub
on:
push:
branches: [ master ]
pull_request:
branches:
- master
- 'releases/**'
jobs:
push-to-dockerhub:
runs-on: ubuntu-latest
steps:
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- uses: actions/checkout@v2
- name: Write Env File
run: |
echo "REST_API_URL=$REST_API_URL" >> .env
echo "CLIENT_ID=$CLIENT_ID" >> .env
echo "CLIENT_SECRET=$CLIENT_SECRET" >> .env
echo "CLIENT_ID_WEB=$CLIENT_ID_WEB" >> .env
echo "CLIENT_SECRET_WEB=$CLIENT_SECRET_WEB" >> .env
env:
REST_API_URL: ${{ secrets.ENV_REST_API_URL }}
CLIENT_ID: ${{ secrets.ENV_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.ENV_CLIENT_SECRET }}
CLIENT_ID_WEB: ${{ secrets.ENV_CLIENT_ID_WEB }}
CLIENT_SECRET_WEB: ${{ secrets.ENV_CLIENT_SECRET_WEB }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./web.Dockerfile
push: true
tags: yonggan/volt_campaigner-web:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}