[release-1.30] Update component versions (#659) #320
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto-update strict branch | |
on: | |
push: | |
branches: | |
- main | |
- 'release-[0-9]+.[0-9]+' | |
jobs: | |
prepare: | |
name: Prepare | |
runs-on: ubuntu-latest | |
outputs: | |
strict: ${{ steps.determine.outputs.strict }} | |
steps: | |
- name: Determine Strict branch | |
id: determine | |
env: | |
BRANCH: ${{ github.ref }} | |
run: | | |
BRANCH=${BRANCH#refs/heads/} # strip off refs/heads/ if it exists | |
if [[ "${BRANCH}" == "main" ]]; then | |
echo "strict=autoupdate/strict" >> "$GITHUB_OUTPUT" | |
elif [[ "${BRANCH}" =~ ^release-[0-9]+\.[0-9]+$ ]]; then | |
echo "strict=autoupdate/${BRANCH}-strict" >> "$GITHUB_OUTPUT" | |
else | |
echo "Failed to determine matching strict branch for ${BRANCH}" | |
echo "strict=" >> $GITHUB_OUTPUT | |
fi | |
update: | |
runs-on: ubuntu-20.04 | |
needs: [ prepare ] | |
if: ${{ needs.prepare.outputs.strict }} | |
steps: | |
- name: Sync ${{ github.ref }} to ${{ needs.prepare.outputs.strict }} | |
uses: actions/checkout@v4 | |
with: | |
ssh-key: ${{ secrets.DEPLOY_KEY_TO_UPDATE_STRICT_BRANCH }} | |
- name: Apply strict patch | |
run: | | |
git checkout -b ${{ needs.prepare.outputs.strict }} | |
./build-scripts/patches/strict/apply | |
- name: Push to ${{ needs.prepare.outputs.strict }} | |
run: | | |
git push origin --force ${{ needs.prepare.outputs.strict }} |