Skip to content

build(deps): bump github/codeql-action from 3.26.4 to 3.26.5 #113

build(deps): bump github/codeql-action from 3.26.4 to 3.26.5

build(deps): bump github/codeql-action from 3.26.4 to 3.26.5 #113

Workflow file for this run

name: Pull Request
on:
pull_request:
branches:
- main
- v[0-9]+
env:
ARTIFACT_NAME_PREFIX: almalinux-pr-${{ github.event.pull_request.number }}
jobs:
check-changes:
name: Check changes since last commit
runs-on: ubuntu-24.04
outputs:
image: ${{ steps.changes.outputs.image }}
builder: ${{ steps.changes.outputs.builder }}
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Check changes
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
filters: ./.github/paths-filter.yml
build:
name: Build base image
needs: check-changes
if: ${{ needs.check-changes.outputs.image == 'true' || needs.check-changes.outputs.builder == 'true' }}
outputs:
local-image: ${{ steps.export.outputs.local-image }}
oci-archive: ${{ steps.export.outputs.oci-archive }}
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: 'true'
- name: Validate release branch version
if: ${{ github.base_ref != 'main' }}
run: |
#!/bin/bash
set -xeo pipefail
releasever=$(yq '.releasever' almalinux-bootc-version.yaml)
if [[ ${GITHUB_BASE_REF#v*} != ${releasever%%.*} ]]
then
echo "Release branch should match major version in manifest"
exit 1
fi
- name: Inject ostree version
run: |
#!/bin/bash
set -xeo pipefail
releasever=$(yq '.releasever' almalinux-bootc-version.yaml)
yq -i ".add-commit-metadata.version = \"${releasever}+$GITHUB_SHA\"" almalinux-bootc-version.yaml
- name: Build image
id: build
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 # v2.13
with:
image: ${{ env.ARTIFACT_NAME_PREFIX }}
tags: ${{ github.sha }}
containerfiles: |
Dockerfile
oci: 'true'
extra-args: |
--security-opt=label=disable
--cap-add=all
--device /dev/fuse
labels: |
org.opencontainers.image.revision=${{ github.sha }}
- name: Export image as oci archive
id: export
run: |
#!/bin/bash
set -xeo pipefail
local_image=localhost/${{ steps.build.outputs.image-with-tag }}
oci_archive=${{ steps.build.outputs.image }}-${{ steps.build.outputs.tags }}.tar
podman save --output $oci_archive --format oci-archive $local_image
echo "local-image=$local_image" >> "$GITHUB_OUTPUT"
echo "oci-archive=$oci_archive" >> "$GITHUB_OUTPUT"
- name: Upload oci archive
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: ${{ steps.export.outputs.oci-archive }}
path: ${{ steps.export.outputs.oci-archive }}
retention-days: 1
compression-level: 0 # oci-archive is already compressed
sbom:
name: Generate SBOM
runs-on: ubuntu-24.04
needs: build
steps:
- name: Download oci archive
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: ${{ needs.build.outputs.oci-archive }}
- name: Generate SBOM
uses: anchore/sbom-action@61119d458adab75f756bc0b9e4bde25725f86a7a # v0.17.2
with:
syft-version: v1.5.0
image: oci-archive:${{ needs.build.outputs.oci-archive }}
artifact-name: ${{ env.ARTIFACT_NAME_PREFIX }}-${{ github.sha }}.syft.json
format: json
upload-artifact: true
upload-artifact-retention: 1
upload-release-assets: false
scan:
name: Vulnerability scan
runs-on: ubuntu-24.04
needs: sbom
steps:
- name: Download SBOM
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: ${{ env.ARTIFACT_NAME_PREFIX }}-${{ github.sha }}.syft.json
- name: Scan SBOM with Grype
uses: anchore/scan-action@64a33b277ea7a1215a3c142735a1091341939ff5 # v4.1.2
id: scan
with:
sbom: ${{ env.ARTIFACT_NAME_PREFIX }}-${{ github.sha }}.syft.json
fail-build: false
output-format: table
only-fixed: true
grype-version: v0.78.0
test-install-to-disk:
name: Test install to disk
needs: build
runs-on: ubuntu-24.04
steps:
- name: Download oci archive
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: ${{ needs.build.outputs.oci-archive }}
- name: Import oci archive into containers-storage
run: >-
sudo podman load --input ${{ needs.build.outputs.oci-archive }} &&
sudo rm ${{ needs.build.outputs.oci-archive }}
- name: Prepare disk file
run: truncate -s5G disk.img
- name: Test bootc install to disk
run: >-
sudo podman run
--rm --pid host --privileged --security-opt label=type:unconfined_t
-v ./:/workdir -v /var/lib/containers/storage:/var/lib/containers/storage
-v /dev:/dev
${{ needs.build.outputs.local-image }}
bootc install to-disk --generic-image --skip-fetch-check --via-loopback
/workdir/disk.img