Skip to content

Commit

Permalink
PXBF-dev: Add workflow for updating hash
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavier Metichecchia authored and Xavier Metichecchia committed Sep 4, 2024
1 parent a797318 commit d623908
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/increment_sub_hash.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Update Submodule Hash

on:
workflow_dispatch: # Allows manual trigger

jobs:
update-submodule:
runs-on: ubuntu-latest

steps:
- name: Checkout repository with submodules
uses: actions/checkout@v4
with:
submodules: true # Checkout the submodule

- name: Fetch latest commit in the submodule
run: |
cd usagov-2021/
git fetch origin # Fetch the latest changes
git checkout origin/main # Checkout the latest commit from submodule (replace 'main' with the submodule's branch)
- name: Push submodule update
run: |
cd usagov-2021/
git push origin HEAD:main # Push the new commit of the submodule
env:
GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }} # Use GitHub token for authentication

0 comments on commit d623908

Please sign in to comment.