diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index b13fe9e..5a63fa4 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -8,6 +8,7 @@ jobs: push_to_registry: name: Push Docker image to Docker Hub runs-on: ubuntu-latest + steps: - name: Check out the repo uses: actions/checkout@v3 @@ -18,14 +19,15 @@ jobs: username: mobiltracker password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + - name: Get the Release Tag + run: | + echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + - name: Build and push Docker image uses: docker/build-push-action@v3.0.0 - env: - GITHUB_REF: ${{ github.ref }} with: context: . push: true tags: | - RELEASE_TAG=${GITHUB_REF#refs/tags/} mobiltracker/prometheus-mssql-exporter:latest mobiltracker/prometheus-mssql-exporter:${RELEASE_TAG}