Merge built artifacts back into main #22
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: Update Flex endpoint | |
on: | |
push: | |
branches: | |
- main | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
prepare-build: | |
name: Prepare build environment | |
runs-on: Ubuntu-20.04 | |
steps: | |
- | |
name: Checkout git repository | |
uses: actions/checkout@v3 | |
id: checkout | |
with: | |
fetch-depth: 0 | |
- | |
name: Configure git | |
run: | | |
git config --global user.email "" | |
git config --global user.name "github-action[bot]" | |
- | |
name: Create build branch | |
run: | | |
git checkout -b flex/main | |
git push -u origin flex/main | |
build: | |
name: Build Flex endpoint | |
needs: [prepare-build] | |
uses: symfony/recipes/.github/workflows/callable-flex-update.yml@main | |
with: | |
contrib: true | |
merge: | |
name: Merge changes | |
needs: [prepare-build, build] | |
runs-on: Ubuntu-20.04 | |
steps: | |
- | |
name: Checkout git repository | |
uses: actions/checkout@v3 | |
id: checkout | |
with: | |
fetch-depth: 0 | |
- | |
name: Configure git | |
run: | | |
git config --global user.email "" | |
git config --global user.name "github-action[bot]" | |
- | |
name: Merge changes back into main branch | |
run: | | |
git merge origin/flex/main -m "Merge built artifacts" | |
git push -u origin main | |
- | |
name: Remove build branch | |
run: | | |
git branch -d origin/flex/main |