Skip to content

Commit

Permalink
perf(action): cook
Browse files Browse the repository at this point in the history
  • Loading branch information
JinnLynn committed Jun 14, 2024
1 parent e5af41f commit f3995e5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/cook-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,27 @@ jobs:
with:
ref: ${{ inputs.branch }}
path: work
- name: Checkout Branch cooked
uses: actions/checkout@v4
with:
ref: cooked
path: cooked
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: fire
run: |
pip install ./work/ && \
mkdir -p ./cooked/${{ inputs.branch }} && \
cd ./cooked/${{ inputs.branch }} && \
rm -rf * && \
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:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ on:

jobs:
master:
if: ${{ github.ref_name == 'master' || github.event.schedule }}
uses: ./.github/workflows/cook-branch.yml
with:
branch: master
dev:
if: ${{ github.ref_name == 'dev' || github.event.schedule }}
uses: ./.github/workflows/cook-branch.yml
with:
branch: dev

0 comments on commit f3995e5

Please sign in to comment.