-
Notifications
You must be signed in to change notification settings - Fork 35
54 lines (48 loc) · 1.32 KB
/
build-test-push.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
## https://docs.docker.com/ci-cd/github-actions
name: build-test-push
on:
schedule:
- cron: '0 4 * * *'
workflow_dispatch:
jobs:
buid-test-push:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
ref: master
-
name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Build
id: test
uses: docker/build-push-action@v2
with:
context: .
file: ./.github/workflows/build-test-push/Dockerfile
push: false
no-cache: true
build-args: |
BRANCH=master
tags: ${{ secrets.DOCKERHUB_USERNAME }}/omicsplayground:test
-
name: Push
if: steps.test.outputs.test_result == 'FALSE'
uses: docker/build-push-action@v2
with:
context: .
file: ./.github/workflows/build-test-push/Dockerfile
push: true
no-cache: true
build-args: |
BRANCH=master
tags: ${{ secrets.DOCKERHUB_USERNAME }}/omicsplayground:test