-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
65 lines (64 loc) · 2.19 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
53
54
55
56
57
58
59
60
61
62
63
64
65
name: 'COPR to GitHub Release Action'
description: 'Uploads COPR-generated RPM assets to GitHub Release based on a tag GitHub Action'
branding:
icon: archive
color: blue
inputs:
copr-owner-name:
description: 'COPR Owner Name'
required: true
copr-project-name:
description: 'COPR Project Name'
required: true
copr-package-name:
description: 'COPR Package Name'
required: true
tag-to-version-regex:
description: 'A regex that extracts and RPM version from the tag'
required: false
default: ""
tag:
description: 'Specific tag to process'
required: false
default: ""
fetch-tags:
description: 'Fetch local tags'
required: false
default: true
clobber-assets:
description: 'If a release already exists upload the assets anyway'
required: false
default: false
no-ignore-epoch:
description: 'Do consider RPM epoch in rpm version extraction and matching'
requried: false
default: false
wait-build:
description: 'If there are COPR builds running for the project, wait for them to complete before proceeding'
required: false
default: true
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install pre-requisites
shell: bash
run: pip install --break-system-packages --no-input requests
- name: Upload COPR results to GH Release assets
shell: bash
run: |
python ${{ github.action_path }}/copr-to-gh-release.py \
--copr-owner-name=${{ inputs.copr-owner-name }} \
--copr-project-name=${{ inputs.copr-project-name }} \
--copr-package-name=${{ inputs.copr-package-name}} \
${{ inputs.tag-to-version-regex != '' && format('--tag-to-version-re=''{0}''', inputs.tag-to-version-regex) || '' }} \
${{ inputs.tag != '' && format('--tag={0}', inputs.tag) || '' }} \
${{ inputs.fetch-tags && '--fetch-tags' || '' }} \
${{ inputs.clobber-assets && '--clobber-assets' || '' }} \
${{ inputs.no-ignore-epoch && '--no-ignore-epoch' || '' }} \
${{ inputs.wait-build && '--wait-build' || '' }}