-
Notifications
You must be signed in to change notification settings - Fork 15
76 lines (75 loc) · 2.41 KB
/
update-meta-gbp.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
68
69
70
71
72
73
74
75
76
on:
workflow_call:
inputs:
dists-json:
required: true
type: string
jobs:
update:
runs-on: ubuntu-latest
outputs:
rev: ${{ steps.push.outputs.rev }}
steps:
- name: configure git
run: |
git config --global user.name 'Anthony Sottile (deadsnakes)'
git config --global user.email '[email protected]'
echo 'DEBFULLNAME=Anthony Sottile (deadsnakes)' >> $GITHUB_ENV
echo '[email protected]' >> $GITHUB_ENV
- name: clone target
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
- name: clone runbooks
uses: actions/checkout@v3
with:
path: runbooks
repository: deadsnakes/runbooks
- name: pull upstream cpython
run: runbooks/meta-gbp update --no-interactive
- name: push changes
id: push
run: |
if [ "$(git rev-list HEAD --count)" -eq 2 ]; then
git push origin HEAD
echo "rev=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
fi
build:
needs: update
if: needs.update.outputs.rev
runs-on: ubuntu-latest
strategy:
matrix:
name: ${{ fromJSON(inputs.dists-json) }}
steps:
- name: configure git
run: |
git config --global user.name 'Anthony Sottile (deadsnakes)'
git config --global user.email '[email protected]'
echo 'DEBFULLNAME=Anthony Sottile (deadsnakes)' >> $GITHUB_ENV
echo '[email protected]' >> $GITHUB_ENV
- name: clone target
uses: actions/checkout@v3
with:
ref: ${{ needs.update.outputs.rev }}
- name: clone runbooks
uses: actions/checkout@v3
with:
path: runbooks
repository: deadsnakes/runbooks
- name: import gpg key
run: |
install --directory ~/.gnupg --mode 700
base64 -d <<< '${{ secrets.GPG_PUBLIC }}' > ~/.gnupg/pubring.gpg
base64 -d <<< '${{ secrets.GPG_SECRET }}' > ~/.gnupg/secring.gpg
chmod 600 ~/.gnupg/*
- name: materialize
run: runbooks/meta-gbp materialize ${{ matrix.name }}
- name: build
run: runbooks/meta-gbp build
- name: test
run: runbooks/quick-test --distrib-codename ${{ matrix.name }} --dist-dir dist --src-dir work
- name: build source package
run: runbooks/meta-gbp build --source
- name: upload package
run: runbooks/meta-gbp upload