-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
52 lines (50 loc) · 1.63 KB
/
action.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Build Anda Project
description: Builds an Anda project.
inputs:
name:
required: true
description: The name of the project to build.
mockConfig:
required: true
description: The name of the mock config to use for the build.
extraInitRepos:
required: false
description: A comma-separated list of extra repositories to initialize before building the project.
andaRepo:
required: false
description: The DNF repository from which you want to install anda from
extraArgs:
required: false
description: Extra arguments to pass to anda
runs:
using: "composite"
steps:
- name: Install DNF plugins
shell: bash
run: dnf5 in -y dnf-plugins-core
- name: Add repository
shell: bash
if: inputs.andaRepo
run: dnf5 config-manager addrepo --from-repofile=${{ inputs.andaRepo }}
- name: Add extra repositories
shell: bash
if: inputs.extraInitRepos
run: |
# separate by comma and add each repo
IFS=',' read -ra EXTRA_REPOS <<< "${{ inputs.extraInitRepos }}"
for repo in "${EXTRA_REPOS[@]}"; do
dnf5 config-manager addrepo --from-repofile=$repo
done
- name: Install packages
shell: bash
run: dnf5 in -y createrepo_c git gcc curl wget anda
- uses: actions/checkout@v3
with:
submodules: "recursive"
fetch-depth: 1
- name: Set up git repository
shell: bash
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Build with Anda
shell: bash
run: anda build ${{ inputs.name }} --package rpm -c ${{ inputs.mockConfig }} ${{ inputs.extraArgs }}