Skip to content

Commit 6a8129f

Browse files
authored
Update release system to tag latest (master) and stable (#19)
1 parent c2df9cb commit 6a8129f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/publish.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
name: Publish to Docker
2-
on:
3-
push:
4-
branches:
5-
- master
1+
name: Docker Package
2+
on: [push]
63
jobs:
74
publish:
85
runs-on: ubuntu-latest
@@ -20,12 +17,16 @@ jobs:
2017
- name: Test
2118
run: go test -v ./...
2219

20+
- name: Echo build ref
21+
run: echo ${{ github.ref }}
22+
2323
- name: Build container
2424
uses: docker/build-push-action@v1
2525
with:
2626
username: scosman
2727
password: ${{ secrets.GITHUB_TOKEN }}
2828
registry: docker.pkg.github.com
2929
repository: scosman/packages/zipstreamer
30-
tags: latest
30+
tags: ${{ format('{0},{1}', (startsWith(github.ref, 'refs/heads/master') && 'latest' || 'dev_branch'), (startsWith(github.ref, 'refs/tags/v') && 'stable' || 'non-stable')) }}
3131
tag_with_sha: true
32+
tag_with_ref: true

0 commit comments

Comments
 (0)