forked from derivative-maker/derivative-maker
-
Notifications
You must be signed in to change notification settings - Fork 3
78 lines (68 loc) · 2.44 KB
/
run_automated_builder.yml
File metadata and controls
78 lines (68 loc) · 2.44 KB
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
77
78
---
name: Run automated builder
on:
pull_request:
branches: [master]
## Branch-push triggers intentionally omitted: a tag-bearing commit
## landing on master would otherwise fire this workflow twice. Tag
## pushes are the canonical release trigger.
push:
tags:
- '*'
## See agents/github-actions-security.md for the standard
## permissions / persist-credentials / fork-PR / SHA-pin patterns.
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
## XXX: hardcoded
## The Ansible vault used by the build is only a repo secret on
## upstream Whonix/derivative-maker. Skip this job on every other
## repo so forks don't fail at vault decrypt.
if: github.repository == 'Whonix/derivative-maker'
runs-on: ubuntu-latest
env:
ANSIBLE_VAULT_PASSWORD: ${{ secrets.ANSIBLE_VAULT_PASSWORD }}
GIT_REPO: ${{ github.repository }}
REF_NAME: ${{ github.ref_name }}
REF_TYPE: ${{ github.ref_type }}
GITHUB_EVENT_NAME: ${{ github.event_name }}
steps:
- name: Checkout repository (with submodules)
## submodules: recursive so help-steps/pre's xtrace.bsh and
## the rest of packages/kicksecure/helper-scripts/ are on
## disk; fetch-depth: 0 so the helper-scripts submodule's
## pinned SHA is reachable.
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
submodules: recursive
fetch-depth: 0
persist-credentials: false
- name: Set up Python 3.13
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: 3.13
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ansible
- name: Run automated builder
run: |
./automated_builder/scripts/run_automated_builder.sh $ANSIBLE_VAULT_PASSWORD
- name: Handle artifacts
if: always()
run: |
./automated_builder/scripts/handle_artifacts.sh $ANSIBLE_VAULT_PASSWORD
- name: Upload artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: always()
with:
name: logs
path: ./automated_builder/logs/
- name: Teardown build
if: always()
run: |
./automated_builder/scripts/teardown_build.sh $ANSIBLE_VAULT_PASSWORD