diff --git a/.github/workflows/build-runner.yml b/.github/workflows/build-runner.yml index 514fff9e..5e9f5eff 100644 --- a/.github/workflows/build-runner.yml +++ b/.github/workflows/build-runner.yml @@ -31,6 +31,10 @@ jobs: DOCKER_VERSION: 19.03.12 DOCKERHUB_USERNAME: ${{ github.repository_owner }} steps: + - name: Set outputs + id: vars + run: echo ::set-output name=sha_short::${GITHUB_SHA::7} + - name: Checkout uses: actions/checkout@v2 @@ -61,4 +65,5 @@ jobs: DOCKER_VERSION=${{ env.DOCKER_VERSION }} tags: | ${{ env.DOCKERHUB_USERNAME }}/${{ matrix.name }}:v${{ env.RUNNER_VERSION }} + ${{ env.DOCKERHUB_USERNAME }}/${{ matrix.name }}:v${{ env.RUNNER_VERSION }}-${{ steps.vars.outputs.sha_short }} ${{ env.DOCKERHUB_USERNAME }}/${{ matrix.name }}:latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fb240d13..a741b6cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,10 @@ jobs: env: DOCKERHUB_USERNAME: ${{ github.repository_owner }} steps: + - name: Set outputs + id: vars + run: echo ::set-output name=sha_short::${GITHUB_SHA::7} + - name: Checkout uses: actions/checkout@v2 @@ -52,5 +56,7 @@ jobs: file: Dockerfile platforms: linux/amd64,linux/arm64 push: true - tags: ${{ env.DOCKERHUB_USERNAME }}/actions-runner-controller:${{ env.VERSION }} + tags: | + ${{ env.DOCKERHUB_USERNAME }}/actions-runner-controller:${{ env.VERSION }} + ${{ env.DOCKERHUB_USERNAME }}/actions-runner-controller:${{ env.VERSION }}-${{ steps.vars.outputs.sha_short }}