-
Notifications
You must be signed in to change notification settings - Fork 61
57 lines (50 loc) · 1.53 KB
/
docker_dev.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Docker dev
on:
workflow_run:
workflows: ["CI"]
branches: ["main"]
types:
- completed
env:
FORCE_COLOR: 3
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
jobs:
release_docker:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Build docker images (API, Web)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set Github ENV variables
shell: bash
run: |
echo "BUILD_TIMESTAMP=$(date '+%F %H:%M:%S')" >> $GITHUB_ENV
echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Build and push (api)
uses: docker/build-push-action@v6.5.0
with:
context: .
push: true
target: api
tags: blossomlabs/blobscan-api:development
build-args: |
BUILD_TIMESTAMP=${{ env.BUILD_TIMESTAMP }}
GIT_COMMIT=${{ env.GIT_COMMIT }}
- name: Build and push (web)
uses: docker/build-push-action@v6.5.0
with:
context: .
push: true
target: web
tags: blossomlabs/blobscan-web:development
build-args: |
BUILD_TIMESTAMP=${{ env.BUILD_TIMESTAMP }}
GIT_COMMIT=${{ env.GIT_COMMIT }}