diff --git a/.github/workflows/cook-branch.yml b/.github/workflows/cook-branch.yml index e62c35d..acacd34 100644 --- a/.github/workflows/cook-branch.yml +++ b/.github/workflows/cook-branch.yml @@ -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: diff --git a/.github/workflows/cook.yml b/.github/workflows/cook.yml index 08be600..f5aa8e5 100644 --- a/.github/workflows/cook.yml +++ b/.github/workflows/cook.yml @@ -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