File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 2828 - name : Set up Docker Buildx
2929 uses : docker/setup-buildx-action@v1
3030
31+ - name : Determine compose-runner version
32+ id : get_version
33+ run : |
34+ if [[ "${GITHUB_REF_TYPE}" == "branch" ]]; then
35+ VERSION="${GITHUB_SHA::12}"
36+ elif [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
37+ VERSION="${GITHUB_REF_NAME}"
38+ elif [[ "${GITHUB_REF_TYPE}" == "release" ]]; then
39+ VERSION="${GITHUB_REF_NAME}"
40+ else
41+ VERSION="${GITHUB_SHA::12}"
42+ fi
43+ echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
44+
3145 - name : Build and push Docker image
3246 uses : docker/build-push-action@v2
3347 with :
3448 context : .
3549 push : true
36- tags : ghcr.io/neurostuff/nsc-runner:${{ github.ref_name == 'main' && 'latest' || github.ref_name }}
50+ build-args : |
51+ COMPOSE_RUNNER_VERSION=${{ steps.get_version.outputs.version }}
52+ tags : |
53+ ghcr.io/neurostuff/nsc-runner:${{ steps.get_version.outputs.version }}
54+ ghcr.io/neurostuff/nsc-runner:${{ github.ref_name == 'main' && 'latest' || steps.get_version.outputs.version }}
You can’t perform that action at this time.
0 commit comments