Update build.yml to pass build_args to Containerfile, single source of info

This commit is contained in:
badblocks 2024-04-25 22:15:47 +00:00 committed by GitHub
parent ab3208c908
commit 935376df93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,7 +5,7 @@ on:
branches: branches:
- main - main
schedule: schedule:
- cron: '05 10 * * *' # 10:05am UTC everyday - cron: '05 10 * * 0' # 10:05am UTC every Sunday
push: push:
branches: branches:
- main - main
@ -17,6 +17,9 @@ env:
MY_IMAGE_NAME: "bazzite-gnome-custom" # the name of the image produced by this build MY_IMAGE_NAME: "bazzite-gnome-custom" # the name of the image produced by this build
MY_IMAGE_DESC: "My Customized Bazzite System Image" MY_IMAGE_DESC: "My Customized Bazzite System Image"
MAJOR_VERSION: "40" MAJOR_VERSION: "40"
SOURCE_IMAGE: "bazzite"
SOURCE_SUFFIX: "-gnome"
VERSION_SUFFIX: "stable"
IMAGE_REGISTRY: "ghcr.io/${{ github.repository_owner }}" # do not edit IMAGE_REGISTRY: "ghcr.io/${{ github.repository_owner }}" # do not edit
jobs: jobs:
@ -108,6 +111,10 @@ jobs:
# Postfix image name with -custom to make it a little more descriptive # Postfix image name with -custom to make it a little more descriptive
# Syntax: https://docs.github.com/en/actions/learn-github-actions/expressions#format # Syntax: https://docs.github.com/en/actions/learn-github-actions/expressions#format
image: ${{ env.MY_IMAGE_NAME }} image: ${{ env.MY_IMAGE_NAME }}
build_args: |
SOURCE_IMAGE=${{ env.SOURCE_IMAGE }}
SOURCE_SUFFIX=${{ env.SOURCE_SUFFIX }}
FEDORA_VERSION=${{ env.MAJOR_VERSION }}-${{ VERSION_SUFFIX }}
tags: | tags: |
${{ steps.generate-tags.outputs.alias_tags }} ${{ steps.generate-tags.outputs.alias_tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}