Files
Biohazard/.github/workflows/ostree-build.yaml
tinfoild[bot] 1f3b820ab1 fix(gha/actions/create-github-app-token): update v2.1.2 ➼ v2.1.4 (#3418)
Co-authored-by: tinfoild[bot] <140665299+tinfoild[bot]@users.noreply.github.com>
2025-09-13 00:19:19 +00:00

58 lines
2.0 KiB
YAML

---
name: OSTree Build
on:
workflow_dispatch:
schedule:
- cron: 0 13 * * 5 # Friday 9pm in SGT/GMT+8, Friday 1pm in UTC
push:
branches: ["main"]
paths:
- "ostree/**"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
timeout-minutes: 40
container:
image: public.ecr.aws/docker/library/fedora:43@sha256:f939807f85f6dab6fbdb34a4ab8cfe0412a768398bbf14ec2b099c96797b9332
# Fix SELinux for the built OSTree: https://github.com/coreos/rpm-ostree/issues/1943
options: --privileged --security-opt label:disable
strategy:
matrix:
build: ["router"]
steps:
- name: Lowercase repository owner
shell: bash
run: |
echo "LOWERCASN_REPO_OWNER=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV
- name: Install dependencies
run: dnf install -y rpm-ostree selinux-policy selinux-policy-targeted policycoreutils podman
- name: "Generate Short Lived OAuth App Token (ghs_*)"
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
id: oauth-token
with:
app-id: "${{ secrets.BOT_APP_ID }}" # $BOT_APP_ID is found in GitHub App main settings page
private-key: "${{ secrets.BOT_JWT_PRIVATE_KEY }}" # $BOT_JWT_PRIVATE_KEY is generated in GitHub App main settings page, uses the X.509 private key format
- name: Checkout
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
token: "${{ steps.oauth-token.outputs.token }}"
- name: Log into container registry
run: podman login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
- name: Download RPM repo files from upstream
run: "./ostree/repos.sh"
- name: Build OSTree and push it to registry
env:
USER: "${{ env.LOWERCASN_REPO_OWNER }}"
BUILD: "${{ matrix.build }}"
run: "cd ./ostree && ./build.sh registry"
# TODO: add secrets and push to private R2/Wasabi/etc