all: Rebuild #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: proot | |
on: | |
push: | |
paths: | |
- proot/** | |
jobs: | |
copr: | |
name: copr | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Setup | |
run: | | |
pip3 install -I copr-cli==1.109 | |
- name: Login | |
run: | | |
copr-cli --config <(echo "${COPR_CLI_CONFIG}") whoami | |
env: | |
COPR_CLI_CONFIG: ${{secrets.COPR_CLI_CONFIG}} | |
- name: Build | |
id: build | |
run: | | |
set -euo pipefail && copr-cli --config <(echo "${COPR_CLI_CONFIG}") buildscm --clone-url "https://github.com/${{github.repository}}" --commit "${{github.sha}}" --subdir "${BUILD_DIR}" --spec "${BUILD_PACKAGE}.spec" --type git --method rpkg "${BUILD_REPO}" | tee >(sed -n "s/^Created builds: /build_id=/p" >> "$GITHUB_OUTPUT") | |
env: | |
COPR_CLI_CONFIG: ${{secrets.COPR_CLI_CONFIG}} | |
BUILD_REPO: pgaskin/${{fromJSON('["proot", "testing"]')[github.ref != 'refs/heads/master']}} | |
BUILD_DIR: proot | |
BUILD_PACKAGE: proot | |
- name: Download | |
run: | | |
copr-cli download-build --dest build "${{steps.build.outputs.build_id}}" | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: COPR Build | |
path: build/** |