Skip to content

Commit 1863447

Browse files
Add conditional for release (#104)
1 parent 28605b3 commit 1863447

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ env:
1717
jobs:
1818

1919
build:
20-
name: Build Artifacts
20+
name: Build Image
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Checkout Repository
@@ -35,18 +35,18 @@ jobs:
3535
tag_with_sha: true
3636
push: false
3737

38-
publish:
39-
name: Publish Artifacts
38+
release:
39+
name: Release Image
4040
runs-on: ubuntu-latest
4141
needs: build
42-
if: github.event_name == 'create' && contains(github.ref, 'refs/tags/')
42+
if: github.ref == 'refs/heads/master' && github.event_name == 'create' && contains(github.ref, 'refs/tags/')
4343
steps:
4444
- name: Checkout Repository
4545
uses: actions/checkout@v2
4646
- name: Retrieve Tag
4747
id: get_version
4848
run: echo ::set-output name=GIT_TAG::$(echo ${GITHUB_REF/refs\/tags\//} | tr -d v)
49-
- name: Push Image
49+
- name: Push to Dockerhub
5050
uses: docker/build-push-action@v1
5151
with:
5252
repository: nginx/nginx-prometheus-exporter

0 commit comments

Comments
 (0)