Skip to content

fix(ci): set permissions #49

fix(ci): set permissions

fix(ci): set permissions #49

Workflow file for this run

name: Build RPM
permissions:
contents: read
on:
workflow_dispatch:
push:
branches: ["main"]
pull_request:
branches: ["main"]
merge_group:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
releasever: [rawhide, 43]
container:
image: ghcr.io/terrapkg/builder:f${{ matrix.releasever }}
options: --cap-add=SYS_ADMIN --privileged
steps:
- name: Checkout Terra repository
uses: actions/checkout@v4
with:
repository: terrapkg/packages
fetch-depth: 0
- name: Checkout Mock Configs
uses: actions/checkout@v4
with:
fetch-depth: 0
path: mock-configs
- name: Set up git repository
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Include custom build template instead of package default
run: cp -v mock-configs/terra*.tpl /etc/mock/templates/
- name: Build with Andaman
run: anda build terra/mock-configs -c mock-configs/terra-${{ matrix.releasever }}-x86_64.cfg
- name: Generating artifact name
id: art
run: |
NAME=${{ matrix.pkg.pkg }}-${{ matrix.pkg.arch }}-${{ matrix.version }}
x=${NAME//\//@}
echo "name=$x" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v4
with:
name: mock-configs-f${{ matrix.releasever }}
compression-level: 0 # The RPMs are already compressed :p
path: |
anda-build/rpm/rpms/*
anda-build/rpm/srpm/*
build-el10:
runs-on: ubuntu-22.04
container:
image: ghcr.io/terrapkg/builder:el10
options: --cap-add=SYS_ADMIN --privileged
steps:
- name: Checkout Terra repository
uses: actions/checkout@v4
with:
repository: terrapkg/packages
fetch-depth: 0
- name: Checkout Mock Configs
uses: actions/checkout@v4
with:
fetch-depth: 0
path: mock-configs
- name: Set up git repository
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Include custom build template instead of package default
run: cp -v mock-configs/*.tpl /etc/mock/templates/
- name: Build with Andaman
run: anda build terra/mock-configs -c mock-configs/terra-el10-x86_64.cfg
- uses: actions/upload-artifact@v4
with:
name: mock-configs-el10
compression-level: 0 # The RPMs are already compressed :p
path: |
anda-build/rpm/rpms/*
anda-build/rpm/srpm/*