Merge pull request #37 from k9withabone/podman-v4.6.0 #3
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 realease | |
name: Release Container | |
on: | |
push: | |
tags: | |
- 'v[0-9]+*' | |
env: | |
MANIFEST: podlet-multiarch | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# From https://podman.io/docs/installation#ubuntu | |
# There is a bug in earlier versions of buildah/podman where the TARGETPLATFORM arg is not set correctly | |
- name: Upgrade podman | |
run: | | |
sudo mkdir -p /etc/apt/keyrings && \ | |
curl -fsSL \ | |
"https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_22.04/Release.key" \ | |
| gpg --dearmor \ | |
| sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null && \ | |
echo \ | |
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg] https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_22.04/ /" \ | |
| sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null && \ | |
sudo apt update && \ | |
sudo apt install -y podman | |
- run: podman version | |
- name: Build image | |
run: | | |
podman build --manifest "${MANIFEST}" \ | |
--platform linux/amd64,linux/arm64/v8 -t podlet . | |
- name: Push to quay.io | |
env: | |
USERNAME: ${{ secrets.QUAY_USERNAME }} | |
PASSWORD: ${{ secrets.QUAY_PASSWORD }} | |
run: | | |
podman manifest push "${MANIFEST}:latest" \ | |
--creds "${USERNAME}:${PASSWORD}" \ | |
"docker://quay.io/k9withabone/podlet:${GITHUB_REF_NAME}" && \ | |
podman manifest push "${MANIFEST}:latest" \ | |
--creds "${USERNAME}:${PASSWORD}" \ | |
"docker://quay.io/k9withabone/podlet:latest" | |
- name: Push to docker.io | |
env: | |
USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: | | |
podman manifest push "${MANIFEST}:latest" \ | |
--creds "${USERNAME}:${PASSWORD}" \ | |
"docker://docker.io/k9withabone/podlet:${GITHUB_REF_NAME}" && \ | |
podman manifest push "${MANIFEST}:latest" \ | |
--creds "${USERNAME}:${PASSWORD}" \ | |
"docker://docker.io/k9withabone/podlet:latest" |