Skip to content

Commit

Permalink
Deploy semver versioned docker images (#85)
Browse files Browse the repository at this point in the history
* Deploy versioned docker images

* Add semver tags
  • Loading branch information
KentonParton authored Apr 24, 2023
1 parent ffc02d5 commit 1a41904
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/publish-docker-images.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Publish Docker Images

on:
push:
tags:
- 'v*'
workflow_call:
secrets:
DOCKERHUB_USERNAME:
Expand Down Expand Up @@ -36,6 +39,11 @@ jobs:
uses: docker/metadata-action@v4
with:
images: ${{ secrets.DOCKERHUB_USERNAME }}/swiple-api
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Cache Docker layers
uses: actions/cache@v2
Expand All @@ -61,6 +69,7 @@ jobs:
# More: https://github.com/moby/buildkit#--export-cache-options
# And: https://github.com/docker/buildx#--cache-tonametypetypekeyvalue
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new

- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
Expand Down

0 comments on commit 1a41904

Please sign in to comment.