mirror of
https://github.com/actions/actions-runner-controller.git
synced 2026-01-05 01:07:57 +08:00
Added github.sha to DockerHub push (#286)
* Added GITHUB.RUN_NUMBER to DockerHub push * switch run_number to sha on docker tag * re-add mutable tags for backwards compatability * truncate to short SHA (7 chars) * behaviour workaround * use ENV to define sha_short * use ::set-output to define sha_short * bump action
This commit is contained in:
5
.github/workflows/build-runner.yml
vendored
5
.github/workflows/build-runner.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user