-
Notifications
You must be signed in to change notification settings - Fork 317
47 lines (47 loc) · 1.22 KB
/
cook-branch.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
name: cook-branch
on:
workflow_call:
inputs:
branch:
type: string
default: master
required: true
jobs:
cooking:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Branch
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
path: work
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: fire
run: |
pip install ./work/ && \
mkdir -p ./tmp &&
cd ./tmp && \
genpac --config=../../work/example/config.ini && \
ls -alhR ./
- name: Checkout Branch cooked
uses: actions/checkout@v4
with:
ref: cooked
path: cooked
- name: copy
run: |
mkdir -p ./cooked/${{ inputs.branch }} && \
rm -rf ./cooked/${{ inputs.branch }}/* && \
cp ./tmp/* ./cooked/${{ inputs.branch }}/ && \
ls -alhR ./cooked/${{ inputs.branch }}/
- name: commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
repository: ./cooked
commit_message: update
add_options: '-A'
push_options: '--force'