diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 7581e4f..91363b2 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -4,6 +4,8 @@ on: push: branches: - 'main' + tags: + - 'v*.*.*' jobs: docker: @@ -12,6 +14,21 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - + name: Docker meta + id: meta + uses: docker/metadata-action@v3 + with: + # list of Docker images to use as base name for tags + images: | + shimberger/wg-http-proxy + # generate Docker tags based on the following events/attributes + tags: | + type=ref,event=branch + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha - name: Set up QEMU uses: docker/setup-qemu-action@v1 @@ -31,5 +48,5 @@ jobs: context: . platforms: linux/amd64,linux/arm64 push: true - tags: | - shimberger/wg-http-proxy:latest + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}