Skip to content

Update the repository #298

Update the repository

Update the repository #298

Workflow file for this run

name: Update the repository
on:
push:
branches:
- cirruslabs
schedule:
- cron: '0 0 * * *'
permissions:
contents: write
jobs:
update:
name: Update the repository (${{ matrix.reference }})
runs-on: ubuntu-latest
strategy:
matrix:
reference: [v3, v4]
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Establish the committer identity
continue-on-error: false
run: |
git config --global user.name "Cirrus Labs"
git config --global user.email "[email protected]"
- name: Add "actions/cache" as a Git remote and fetch it
continue-on-error: false
run: |
git remote add upstream https://github.com/actions/cache.git
git fetch upstream --tags --force
- name: Checkout to a new branch that is pointing to ${{ matrix.reference }}
continue-on-error: false
run: |
git checkout -B ${{ matrix.reference }} ${{ matrix.reference }}
- name: Remove the workflow directory
continue-on-error: false
run: |
rm -rf .github/workflows
- name: Apply Cirrus Labs modifications
continue-on-error: false
run: |
git show cirruslabs:trampoline.mjs > dist/restore/trampoline.mjs
git show cirruslabs:trampoline.mjs > dist/restore-only/trampoline.mjs
git show cirruslabs:trampoline.mjs > dist/save/trampoline.mjs
git show cirruslabs:trampoline.mjs > dist/save-only/trampoline.mjs
sed -i 's/index.js/trampoline.mjs/' action.yml restore/action.yml save/action.yml
- name: Commit and push the changes
continue-on-error: false
run: |
git add . && git commit -m "Cirrus Labs modifications"
- name: Force-push to the "${{ matrix.reference }}" branch
run: git push -f origin refs/heads/${{ matrix.reference }}