From 01bf36c992aea8fee26395fa31b57a05661dcb94 Mon Sep 17 00:00:00 2001 From: Mark Ettema Date: Mon, 24 May 2021 10:20:29 +0700 Subject: [PATCH] Create tags --- .github/workflows/docker-image.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 7a12067..3e3a97d 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -25,10 +25,27 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - + name: Docker meta + id: meta + uses: docker/metadata-action@v3 + with: + images: | + ghcr.io/neothor/steam-openid-connect-provider + tags: | + type=schedule + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha + - name: Build and push uses: docker/build-push-action@v2 with: context: src/ - push: true - tags: ghcr.io/neothor/steam-openid-connect-provider:$(date +%s) + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}