diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 45291d1..b035088 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,21 +29,28 @@ jobs: GH_RELEASER: ${{ secrets.GH_RELEASER }} docker-hub: needs: release - name: Deploy to docker-hub + name: Deploy to DockerHub runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Login to docker hub - uses: docker/login-action@v2 + - name: Login to DockerHub + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_TOKEN }} + - name: Extract Docker metadata + uses: docker/metadata-action@v5 + with: + images: ${{ github.action_repository }} + tags: | + type=ref,event=tag + - name: Build and push to docker registry if: success() - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: true - tags: ${{ env.GITHUB_REPOSITORY }}:latest,${{ env.GITHUB_REPOSITORY }}:${IMAGE_TAG} \ No newline at end of file + tags: ${{ steps.meta.outputs.tags }} \ No newline at end of file