aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-06-16 19:14:15 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-06-16 19:36:47 +0300
commit2b90c7f8a458a281136a684148c77ebe9251b49d (patch)
tree372289f5b68901b2f585059ed6ec56d2c8bc0696
parentwhat? how did this work? (diff)
downloadcgitize-2b90c7f8a458a281136a684148c77ebe9251b49d.tar.gz
cgitize-2b90c7f8a458a281136a684148c77ebe9251b49d.zip
workflows/ci: push versioned images to Docker Hub
-rw-r--r--.github/workflows/ci.yml16
1 files changed, 15 insertions, 1 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 73aa411..2867eda 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -41,6 +41,19 @@ jobs:
name: 'Publish: Docker Hub'
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags'))
steps:
+ # https://github.com/docker/metadata-action#semver
+ - id: meta
+ name: Docker Hub metadata
+ uses: docker/metadata-action@v3
+ with:
+ images: '${{ secrets.DOCKERHUB_USERNAME }}/cgitize'
+ flavor: |
+ latest=auto
+ tags: |
+ type=ref,event=branch
+ type=semver,pattern={{version}}
+ type=semver,pattern={{major}}.{{minor}}
+ type=semver,pattern={{major}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
@@ -55,7 +68,8 @@ jobs:
with:
platforms: linux/amd64,linux/armhf
push: true
- tags: '${{ secrets.DOCKERHUB_USERNAME }}/cgitize:latest'
+ tags: '${{ steps.meta.outputs.tags }}'
+ labels: '${{ steps.meta.outputs.labels }}'
publish_pypi:
needs: [test_local, test_docker]