chore: bump release #117
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 and publish test image" | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'builder/**' | |
permissions: | |
packages: write | |
jobs: | |
publish_images: | |
name: 'Build and publish' | |
runs-on: ubuntu-latest | |
env: | |
IMAGETAG: ${{ github.ref_name }} | |
steps: | |
- uses: actions/checkout@v3 | |
- id: build | |
run: | | |
# Build the test image | |
cd builder && ./build.sh | |
- id: publish | |
run: | | |
# Publish the branch | |
trap 'buildah logout ghcr.io' EXIT | |
buildah login -u ${{ github.actor }} --password-stdin ghcr.io <<<"${{ secrets.GITHUB_TOKEN }}" | |
images=(${{ steps.build.outputs.images }}) | |
urls="" | |
for image in "${images[@]}" ; do | |
buildah push $image docker://${image}:${IMAGETAG:?} | |
if [[ "${IMAGETAG}" == "main" || "${IMAGETAG}" == "master" ]]; then | |
buildah push $image docker://${image}:latest | |
fi | |
urls="${image}:${IMAGETAG} "$'\n'"${urls}" | |
done | |
echo "::notice title=Image URLs::${urls}" |