-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
67 lines (67 loc) · 2.31 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
66
67
name: 'Update Wrapdb action'
description: 'Update the wrapdb with a github release from a github action.'
inputs:
source-repository:
description: 'The repository that has a new release'
required: true
project-name:
description: 'An override for the project name (default is the repo name)'
required: false
default: ''
release-tag:
description: 'The tag associated with the new release'
required: true
provides:
description: 'The provides argument for the wrap file (separated by comma if multiple)'
required: true
push-repository:
description: 'The repository where the changes are pushed to and the pr is opened from.'
required: true
push-email:
description: 'The email used for the automatic commit in the push repository.'
required: false
default: 'github-action@users.noreply.github.com'
github_token:
description: 'The github token used to open the pr and push to the push repository.'
required: true
run_sanity_checks:
description: 'run the wrapdb sanity checks after uploading the new commit'
required: false
default: 'false'
runs:
using: "composite"
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install pipenv
shell: bash
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- name: Install dependencies
shell: bash
run: |
cd ${{ github.action_path }}
pipenv install
- name: Run the update script
shell: bash
env:
GH_TOKEN: ${{ inputs.github_token }}
run: |
git config --global user.email "${{ inputs.push-email }}"
git config --global user.name "GitHub Action"
gh auth status
gh auth setup-git
cd ${{ github.action_path }}
pipenv run python update_repo.py \
--url "${{ inputs.source-repository }}" \
--name "${{ inputs.project-name }}" \
--tag "${{ inputs.release-tag }}" \
--push-url "${{ inputs.push-repository }}" \
--provides "${{ inputs.provides }}"
- name: Run the sanity checks
shell: bash
if: ${{ inputs.run_sanity_checks != 'false' }}
run: |
cd ${{ github.action_path }}/wrapdb
python3 -m pip install meson ninja
python3 tools/sanity_checks.py