Skip to content

Commit 4a0ad64

Browse files
authored
Update main.yml
1 parent a81836b commit 4a0ad64

File tree

1 file changed

+23
-30
lines changed

1 file changed

+23
-30
lines changed

.github/workflows/main.yml

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,47 +7,40 @@ on:
77
# Triggers the workflow on push or pull request events but only for the master branch
88
push:
99
branches: [ master ]
10-
tags: [ '*' ]
10+
tags: [ "v*.*.*" ]
1111
pull_request:
1212
branches: [ master ]
13-
13+
release:
14+
types: ["created"]
1415
# Allows you to run this workflow manually from the Actions tab
1516
workflow_dispatch:
17+
inputs: {}
1618

1719
# A workflow run is made up of one or more jobs that can run sequentially or in parallelname: ci
1820

1921
jobs:
20-
docker:
21-
runs-on: ubuntu-latest
22+
build:
23+
runs-on: ubuntu-20.04
2224
steps:
23-
-
24-
name: Set up QEMU
25-
uses: docker/setup-qemu-action@v1
26-
-
27-
name: Set up Docker Buildx
28-
uses: docker/setup-buildx-action@v1
29-
-
30-
name: Docker meta
31-
id: meta
32-
uses: docker/metadata-action@v3
25+
- uses: actions/checkout@v3
3326
with:
34-
images: hyperflowwms/hyperflow
35-
tags: |
36-
type=semver,pattern={{raw}}
37-
-
38-
name: Login to DockerHub
39-
uses: docker/login-action@v1
27+
# Need tags for Makefile logic to work
28+
fetch-depth: 0
29+
- name: Build the Docker images
30+
run: make images
31+
deploy:
32+
needs: [ "build" ]
33+
runs-on: ubuntu-20.04
34+
if: github.event_name == 'release' && github.event.action == 'created'
35+
steps:
36+
- name: Login to Docker Hub
37+
uses: docker/login-action@v2
4038
with:
4139
username: ${{ secrets.DOCKERHUB_USERNAME }}
4240
password: ${{ secrets.DOCKERHUB_TOKEN }}
43-
-
44-
name: Build and push
45-
id: docker_build
46-
uses: docker/build-push-action@v2
41+
- uses: actions/checkout@v2
4742
with:
48-
push: true
49-
tags: ${{ steps.meta.outputs.tags }}
50-
labels: ${{ steps.meta.outputs.labels }}
51-
-
52-
name: Image digest
53-
run: echo ${{ steps.docker_build.outputs.digest }}
43+
# Need tags for Makefile logic to work
44+
fetch-depth: 0
45+
- name: Build and Push Docker Images
46+
run: make push

0 commit comments

Comments
 (0)