mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 02:47:56 +01:00
Pass Flatpak vars directly and let Makefile figure it out from there (#94)
This commit is contained in:
parent
7311a1d4c8
commit
bcc5ae23a1
2 changed files with 114 additions and 9 deletions
111
.github/workflows/build_iso.yml
vendored
111
.github/workflows/build_iso.yml
vendored
|
|
@ -158,3 +158,114 @@ jobs:
|
||||||
context: ${{ env.JOB_NAME }} (${{ matrix.version }})
|
context: ${{ env.JOB_NAME }} (${{ matrix.version }})
|
||||||
sha: ${{ env.sha }}
|
sha: ${{ env.sha }}
|
||||||
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
||||||
|
|
||||||
|
build_iso_no_flatpaks:
|
||||||
|
name: Build ISO without Flatpaks
|
||||||
|
env:
|
||||||
|
JOB_NAME: Build ISO without Flatpaks
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- load_vars
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
statuses: write
|
||||||
|
continue-on-error: false
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
version:
|
||||||
|
- 38
|
||||||
|
- 39
|
||||||
|
- 40
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Switch branch
|
||||||
|
if: inputs.pr
|
||||||
|
env:
|
||||||
|
GITHUB_USER: ${{ github.actor }}
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y hub
|
||||||
|
hub pr checkout ${{ inputs.pr }}
|
||||||
|
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Get Current Job Log URL
|
||||||
|
if: inputs.pr && always()
|
||||||
|
uses: Tiryoh/gha-jobid-action@v1
|
||||||
|
id: jobs
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
job_name: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }})"
|
||||||
|
|
||||||
|
- name: Set status
|
||||||
|
if: inputs.pr && always()
|
||||||
|
uses: myrotvorets/set-commit-status-action@v2.0.1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
status: pending
|
||||||
|
context: ${{ env.JOB_NAME }} (${{ matrix.version }})
|
||||||
|
sha: ${{ env.sha }}
|
||||||
|
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
||||||
|
|
||||||
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
uses: jlumbroso/free-disk-space@main
|
||||||
|
with:
|
||||||
|
# this might remove tools that are actually needed,
|
||||||
|
# if set to "true" but frees about 6 GB
|
||||||
|
tool-cache: false
|
||||||
|
|
||||||
|
# all of these default to true, but feel free to set to
|
||||||
|
# "false" if necessary for your workflow
|
||||||
|
android: true
|
||||||
|
dotnet: true
|
||||||
|
haskell: true
|
||||||
|
large-packages: true
|
||||||
|
docker-images: true
|
||||||
|
swap-storage: true
|
||||||
|
|
||||||
|
- name: Lowercase Registry
|
||||||
|
id: registry_case
|
||||||
|
uses: ASzc/change-string-case-action@v6
|
||||||
|
with:
|
||||||
|
string: ${{ needs.load_vars.outputs.IMAGE_REPO }}
|
||||||
|
|
||||||
|
- name: Get image version
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
tags: |
|
||||||
|
type=ref,event=branch
|
||||||
|
type=ref,event=pr
|
||||||
|
|
||||||
|
- name: Login to Registry
|
||||||
|
run: |
|
||||||
|
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||||
|
|
||||||
|
- name: Build ISO
|
||||||
|
uses: ./
|
||||||
|
id: build
|
||||||
|
with:
|
||||||
|
arch: ${{ needs.load_vars.outputs.ARCH }}
|
||||||
|
image_name: ${{ needs.load_vars.outputs.IMAGE_NAME }}
|
||||||
|
image_repo: ${{ needs.load_vars.outputs.IMAGE_REPO }}
|
||||||
|
image_tag: ${{ matrix.version }}
|
||||||
|
version: ${{ matrix.version }}
|
||||||
|
variant: ${{ needs.load_vars.outputs.VARIANT }}
|
||||||
|
secure_boot_key_url: ${{ needs.load_vars.outputs.SECURE_BOOT_KEY_URL }}
|
||||||
|
enrollment_password: ${{ needs.load_vars.outputs.ENROLLMENT_PASSWORD }}
|
||||||
|
iso_name: ${{ needs.load_vars.outputs.IMAGE_NAME }}-${{ matrix.version }}.iso
|
||||||
|
|
||||||
|
- name: Set status
|
||||||
|
if: inputs.pr && always()
|
||||||
|
uses: myrotvorets/set-commit-status-action@v2.0.1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
status: ${{ job.status }}
|
||||||
|
context: ${{ env.JOB_NAME }} (${{ matrix.version }})
|
||||||
|
sha: ${{ env.sha }}
|
||||||
|
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
||||||
|
|
|
||||||
12
action.yml
12
action.yml
|
|
@ -135,7 +135,7 @@ runs:
|
||||||
mkdir /cache/skopeo || true
|
mkdir /cache/skopeo || true
|
||||||
|
|
||||||
- name: Determine Flatpak dependencies
|
- name: Determine Flatpak dependencies
|
||||||
if: inputs.enable_flatpak_dependencies == 'true'
|
if: inputs.enable_flatpak_dependencies == 'true' && (inputs.flatpak_remote_refs != '' || inputs.flatpak_remote_refs_dir != '')
|
||||||
id: flatpak_dependencies
|
id: flatpak_dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -207,13 +207,6 @@ runs:
|
||||||
then
|
then
|
||||||
echo "ERROR: flatpak_remote_refs is mutually exclusive to flatpak_remote_refs_dir"
|
echo "ERROR: flatpak_remote_refs is mutually exclusive to flatpak_remote_refs_dir"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
|
||||||
if [[ -n "${{ inputs.flatpak_remote_refs }}" ]]
|
|
||||||
then
|
|
||||||
vars="${vars} FLATPAK_REMOTE_REFS=\"${{ inputs.flatpak_remote_refs }}\""
|
|
||||||
else
|
|
||||||
vars="${vars} FLATPAK_REMOTE_REFS_DIR=\"${{ inputs.flatpak_remote_refs_dir }}\""
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
docker run --privileged --volume ${{ github.workspace }}:/github/workspace/ ${cache} ${image}:${tag} \
|
docker run --privileged --volume ${{ github.workspace }}:/github/workspace/ ${cache} ${image}:${tag} \
|
||||||
ADDITIONAL_TEMPLATES="${{ inputs.additional_templates }}" \
|
ADDITIONAL_TEMPLATES="${{ inputs.additional_templates }}" \
|
||||||
|
|
@ -221,7 +214,8 @@ runs:
|
||||||
DNF_CACHE="/cache/dnf" \
|
DNF_CACHE="/cache/dnf" \
|
||||||
ENROLLMENT_PASSWORD="${{ inputs.enrollment_password }}" \
|
ENROLLMENT_PASSWORD="${{ inputs.enrollment_password }}" \
|
||||||
FLATPAK_REMOTE_NAME="${{ inputs.flatpak_remote_name }}" \
|
FLATPAK_REMOTE_NAME="${{ inputs.flatpak_remote_name }}" \
|
||||||
${vars} \
|
FLATPAK_REMOTE_REFS="${{ inputs.flatpak_remote_refs }}" \
|
||||||
|
FLATPAK_REMOTE_REFS_DIR="${{ inputs.flatpak_remote_refs_dir }}" \
|
||||||
FLATPAK_REMOTE_URL="${{ inputs.flatpak_remote_url }}" \
|
FLATPAK_REMOTE_URL="${{ inputs.flatpak_remote_url }}" \
|
||||||
FLATPAK_DIR="${{ steps.flatpak_dependencies.outputs.flatpak_dir && format('/github/workspace/{0}', steps.flatpak_dependencies.outputs.flatpak_dir) || '' }}" \
|
FLATPAK_DIR="${{ steps.flatpak_dependencies.outputs.flatpak_dir && format('/github/workspace/{0}', steps.flatpak_dependencies.outputs.flatpak_dir) || '' }}" \
|
||||||
IMAGE_NAME="${{ inputs.image_name }}" \
|
IMAGE_NAME="${{ inputs.image_name }}" \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue