[sot] Experimental workflow to update a branch with auto-generated code (#37233)

For now this just adds a file `.source-revision` that contains the sha-1
of the originating commit, but we ought to be able to build this out to
generate more things
pull/37244/head
Craig Tiller 4 months ago committed by GitHub
parent 42af03f2ec
commit 73a5382c98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 34
      .github/workflows/update-artifacts-branch.yaml

@ -0,0 +1,34 @@
name: EXPERIMENTAL -- Update artifacts branch
on:
push:
branches:
- master
permissions:
contents: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0
- name: Setup git user
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "<EMAIL>"
- name: Update artifacts branch
run: |
git checkout master
git fetch origin
git checkout artifacts
git reset master .
git clean -fd
git rev-parse master > .source-revision
git add .
git commit -m "Update artifacts branch"
git push origin artifacts
Loading…
Cancel
Save