This repository has been archived by the owner on Nov 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: RJ Trujillo <[email protected]>
- Loading branch information
Showing
1 changed file
with
16 additions
and
44 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,57 +144,29 @@ jobs: | |
# we can retry on that unfortunately common failure case | ||
podman pull quay.io/fedora/fedora-bootc:${{ matrix.fedora_version }} | ||
# Build image using Buildah action | ||
- name: Build Image | ||
id: build_image | ||
uses: redhat-actions/buildah-build@v2 | ||
with: | ||
archs: ${{ env.ARCHS }} | ||
containerfiles: | | ||
./Containerfile | ||
image: ${{ env.IMAGE_NAME }} | ||
tags: | | ||
${{ steps.generate-tags.outputs.alias_tags }} | ||
build-args: | | ||
IMAGE_NAME=${{ matrix.image_name }} | ||
FEDORA_MAJOR_VERSION=${{ matrix.fedora_version }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
oci: false | ||
|
||
# Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR. | ||
# https://github.com/macbre/push-to-ghcr/issues/12 | ||
- name: Lowercase Registry | ||
id: registry_case | ||
uses: ASzc/change-string-case-action@v6 | ||
with: | ||
string: ${{ env.IMAGE_REGISTRY }} | ||
|
||
- name: Push To GHCR | ||
uses: Wandalen/[email protected] | ||
id: push | ||
if: github.event_name != 'pull_request' | ||
env: | ||
REGISTRY_USER: ${{ github.actor }} | ||
REGISTRY_PASSWORD: ${{ github.token }} | ||
with: | ||
action: redhat-actions/push-to-registry@v2 | ||
attempt_limit: 3 | ||
attempt_delay: 15000 | ||
with: | | ||
image: ${{ steps.build_image.outputs.image }} | ||
tags: ${{ steps.build_image.outputs.tags }} | ||
registry: ${{ steps.registry_case.outputs.lowercase }} | ||
username: ${{ env.REGISTRY_USER }} | ||
password: ${{ env.REGISTRY_PASSWORD }} | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
uses: docker/login-action@v2 | ||
if: github.event_name != 'pull_request' | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Build/push image using docker buildx action | ||
- name: Build and Push Image | ||
id: build_image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: ${{ github.event_name != 'pull_request' }} | ||
context: . | ||
file: ./Containerfile | ||
platforms: linux/aarch64, linux/x86_64 | ||
build-args: | | ||
IMAGE_NAME=${{ matrix.image_name }} | ||
FEDORA_MAJOR_VERSION=${{ matrix.fedora_version }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
|
||
# Sign container | ||
- uses: sigstore/[email protected] | ||
if: github.event_name != 'pull_request' | ||
|