Merge pull request #79 from containers/v0.3.0-fixes #7
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
# Builds and pushes container images upon release | |
name: Release Container | |
on: | |
push: | |
tags: | |
- "v[0-9]+*" | |
env: | |
MANIFEST: podlet-multiarch | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
container: | |
image: quay.io/containers/buildah:latest | |
options: --security-opt seccomp=unconfined --security-opt apparmor=unconfined --device /dev/fuse:rw | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- run: buildah version | |
- name: Create manifest | |
run: | | |
buildah manifest create \ | |
--annotation "org.opencontainers.image.source=https://github.com/containers/podlet" \ | |
--annotation '"org.opencontainers.image.description=Generate Podman Quadlet files from a Podman command, compose file, or existing object"' \ | |
--annotation "org.opencontainers.image.licenses=MPL-2.0" \ | |
"${MANIFEST}" | |
- name: Build image | |
run: | | |
buildah build --manifest "${MANIFEST}" \ | |
--platform linux/amd64,linux/arm64/v8 -t podlet . | |
- name: Push to ghcr.io | |
env: | |
USERNAME: ${{ github.actor }} | |
PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
buildah manifest push "${MANIFEST}:latest" \ | |
--creds "${USERNAME}:${PASSWORD}" \ | |
"docker://ghcr.io/containers/podlet:${GITHUB_REF_NAME}" && \ | |
buildah manifest push "${MANIFEST}:latest" \ | |
--creds "${USERNAME}:${PASSWORD}" \ | |
"docker://ghcr.io/containers/podlet:latest" |