-
Notifications
You must be signed in to change notification settings - Fork 6
36 lines (34 loc) · 1.17 KB
/
artifacts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
name: COPR build
on:
push:
branches: [ main ]
jobs:
rpm:
name: Submit a build from Fedora container
container: fedora:latest
runs-on: ubuntu-latest
steps:
- name: Install API token for copr-cli
env:
API_TOKEN_CONTENT: ${{ secrets.COPR_API_TOKEN }}
run: |
mkdir -p "$HOME/.config"
echo "$API_TOKEN_CONTENT" > "$HOME/.config/copr"
- name: Install tooling for source RPM build
run: |
dnf -y install @development-tools @rpm-development-tools
dnf -y install copr-cli make jq
- name: Check out proper version of sources
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build the source RPM
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
make rpm-src
- name: Submit the build by uploading the source RPM
run: |
make rpm-copr-testing
# Delete olders builds
copr-cli list-builds project-flotta/flotta-testing --output-format json | jq '[.[]|select(.name=="flotta-dev-cli")] | sort_by(.id) | reverse[] | .id' | sed '1d' | xargs copr-cli delete-build