Sync latest upstream master into local master #728
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync latest upstream master into local master | |
on: | |
schedule: | |
- cron: "0 5 * * *" | |
workflow_dispatch: | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get Token with workflows permission | |
id: get_workflow_token | |
uses: xing/workflow-application-token-action@main | |
with: | |
application_id: ${{ secrets.XING_ACTIONS_APP_ID }} | |
application_private_key: ${{ secrets.XING_ACTIONS_PRIVATE_KEY }} | |
permissions: "contents:write,workflows:write" | |
- uses: actions/checkout@v3 | |
name: Reset xing/act#master to latest nektos/act#master | |
with: | |
ref: master | |
token: ${{ steps.get_workflow_token.outputs.token }} | |
- run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git remote add upstream https://github.com/nektos/act.git | |
git fetch upstream | |
git reset --hard upstream/master | |
git push --follow-tags --force origin master | |
- uses: actions/checkout@v3 | |
name: Update act submodule and push to xing/act#distribution | |
with: | |
ref: distribution | |
submodules: true | |
token: ${{ steps.get_workflow_token.outputs.token }} | |
- run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
make update-act | |
if git status --porcelain | grep 'M act' >/dev/null; then | |
git commit -a -m "chore: update act (submodule)" | |
git push origin distribution | |
fi |