summaryrefslogtreecommitdiffstats
path: root/third_party/rust/jsparagus/.github/workflows/ci-generated.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /third_party/rust/jsparagus/.github/workflows/ci-generated.yml
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/jsparagus/.github/workflows/ci-generated.yml')
-rw-r--r--third_party/rust/jsparagus/.github/workflows/ci-generated.yml54
1 files changed, 54 insertions, 0 deletions
diff --git a/third_party/rust/jsparagus/.github/workflows/ci-generated.yml b/third_party/rust/jsparagus/.github/workflows/ci-generated.yml
new file mode 100644
index 0000000000..4027c6c9c6
--- /dev/null
+++ b/third_party/rust/jsparagus/.github/workflows/ci-generated.yml
@@ -0,0 +1,54 @@
+name: Generate Files
+
+on:
+ push:
+ branches:
+ - master
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
+ - name: Setup Python
+ uses: actions/setup-python@v1
+ with:
+ python-version: "3.7"
+ - name: Setup Git Profile
+ run: |
+ git config --local user.email "action@github.com"
+ git config --local user.name "GitHub Action"
+ - name: Revert Previous Change and Merge Master
+ run: |
+ if git ls-remote origin | grep refs/heads/ci_generated; then
+ # If the remote branch exists.
+ git fetch origin
+
+ # Merge master, discarding changes in origin/ci_generated
+ MASTER_REV=$(git log -1 master --pretty=%H)
+ git checkout -b ci_generated-master origin/master
+ git merge origin/ci_generated -m "Merge master ${MASTER_REV}" -s ours --allow-unrelated-histories
+ else
+ # Otherwise, just start from master branch.
+ git checkout -b ci_generated-master
+ fi
+ - name: Generate Files
+ run: |
+ make init-venv && make all
+ # OS independant replace
+ sed -i.bak '/*_generated.rs/d' .gitignore && rm .gitignore.bak
+ - name: Commit files
+ run: |
+ git add .
+ MASTER_REV=$(git log -1 master --pretty=%H)
+ git commit -m "Add Generated Files for ${MASTER_REV}" -a
+ - name: Push changes
+ uses: ad-m/github-push-action@master
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ branch: ci_generated
+