feat: split image flag into image name and tag #32
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
pull_request: | |
push: | |
branches: | |
- "master" | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: docker/setup-buildx-action@v3 | |
id: buildx | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- name: output docker build args | |
id: args | |
run: | | |
echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT | |
echo "revision=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | |
echo "version=$(git describe --tags)" >> $GITHUB_OUTPUT | |
- uses: docker/build-push-action@v5 | |
with: | |
builder: ${{ steps.buildx.outputs.name }} | |
provenance: false | |
push: true | |
tags: | | |
ghcr.io/joshdk/actions-docker-shim:${{ github.sha }} | |
build-args: | | |
CREATED=${{ steps.args.outputs.created }} | |
REVISION=${{ steps.args.outputs.revision }} | |
VERSION=${{ steps.args.outputs.version }} |