Skip to content

Commit

Permalink
Automerge on success
Browse files Browse the repository at this point in the history
  • Loading branch information
CallumWalley committed Apr 10, 2024
1 parent f5130b9 commit e5b28d9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/fetch_includes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:
GLOSSARY_URL: "https://raw.githubusercontent.com/nesi/nesi-wordlist/main/outputs/glossary.md"
DICTIONARY_URL: "https://raw.githubusercontent.com/nesi/nesi-wordlist/main/outputs/dictionary.txt"
SNIPPETS_URL: "https://raw.githubusercontent.com/nesi/nesi-wordlist/main/outputs/snippets.md"
BRANCH_NAME: "new-assets"
BRANCH_NAME: "assets-update"
jobs:
fetch-includes:
runs-on: ubuntu-latest
Expand All @@ -18,7 +18,7 @@ jobs:
- run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git checkout -b ${BRANCH_NAME}
git checkout -b $(date +'%Y-%m-%d')-${BRANCH_NAME}
mkdir -pv docs/assets/glossary
- name: Fetch Module List
run: wget -O docs/assets/module-list.json ${MODULES_LIST_URL}
Expand All @@ -30,18 +30,19 @@ jobs:
run: wget -O docs/assets/glossary/dictionary.txt ${DICTIONARY_URL}
- name: Fetch Snippets
run: wget -O docs/assets/glossary/snippets.md ${SNIPPETS_URL}
- name: Commit to Branch '${BRANCH_NAME}'
- name: Commit to Branch
id: commit
run: |
git pull origin ${GITHUB_REF}
git add --all
git commit -m "update remote assets"
git commit -m "Add updated remote assets"
echo "change=$?" >> $GITHUB_OUTPUT
- name: Push, and make PR
if: ${{ steps.commit.outputs.change != 1 }}
run: |
echo "last job ${{ steps.commit.outputs.change }}"
git push origin ${BRANCH_NAME}
gh pr create -B ${GITHUB_REF} -H ${BRANCH_NAME} --title 'Update Remote Assets' --body 'Created by Github action'
gh pr merge --auto
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit e5b28d9

Please sign in to comment.