Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Sync Gradle Upstream #1468

Sync Gradle Upstream

Sync Gradle Upstream #1468

Workflow file for this run

name: 'Sync Gradle Upstream'
on:
schedule:
- cron: '0 5-22/2 * * *'
workflow_dispatch:
env:
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
SCRIPTS: .github/workflows/scripts
jobs:
sync:
runs-on: ubuntu-latest
name: Sync latest changes from upstream master branch
strategy:
fail-fast: false
matrix:
branches: [ {cradle: main, gradle: master}, {cradle: release, gradle: release} ]
env:
cradle_branch: ${{ matrix.branches.cradle }}
gradle_branch: ${{ matrix.branches.gradle }}
steps:
- name: Checkout Cradle repository
uses: actions/checkout@v3
with:
# We need to specify a token here, because the default "GITHUB_TOKEN"
# will not trigger a "push" event.
token: ${{ secrets.BOT_TOKEN }}
# We need to fetch the full history, because we need to compare
# the current branch with the upstream branch.
fetch-depth: 0
- name: Configure git
run: ${{ env.SCRIPTS }}/configure-git.sh
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.BOT_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.BOT_GPG_PASSPHRASE }}
git_user_signingkey: true
# Sign all commits automatically.
git_commit_gpgsign: true
- name: Merge upstream changes
run: ${{ env.SCRIPTS }}/merge-upstream-changes.sh
- name: Checkout upstream tags
# We only need to run this once
if: ${{ env.cradle_branch == 'main' }}
run: ${{ env.SCRIPTS }}/checkout-upstream-tags.sh