Add headers workflow #14
Workflow file for this run
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
# heavily inspired by https://www.paigeniedringhaus.com/blog/copy-files-from-one-repo-to-another-automatically-with-git-hub-actions | |
name: Copy headers to separate repo | |
on: | |
push: | |
branches: | |
- master | |
- headers-repo # FIXME remove this | |
jobs: | |
copy_headers: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out OdysseyDecomp project | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Check out OdysseyHeaders project | |
uses: actions/checkout@v3 | |
with: | |
repository: MonsterDruide1/OdysseyHeaders | |
path: ./OdysseyHeaders | |
token: ${{ secrets.HEADERS_TOKEN }} | |
- name: Copy files | |
run: bash ./.github/scripts/copy-headers.sh | |
env: | |
DESTINATION_PATH: ./OdysseyHeaders | |
- name: Push to OdysseyHeaders repo | |
run: bash ./.github/scripts/push-headers.sh | |
env: | |
COMMIT_AUTHOR_NAME: ${{ github.event.commits[0].author.name }} | |
COMMIT_AUTHOR_MAIL: ${{ github.event.commits[0].author.email }} | |
COMMIT_MESSAGE: ${{ github.event.commits[0].message }} |