0.8.2 #25
Workflow file for this run
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# GitHub recommends pinning actions to a commit SHA. | |
# To get a newer version, you will need to update the SHA. | |
# You can also reference a tag or branch, but the action may change without warning. | |
name: Release | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
merge: | |
name: Merge Master to Production | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Wait for checks to complete | |
run: | | |
state="pending" | |
while [[ "$state" == "pending" ]] | |
do | |
state=$(curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/heitorpolidoro/bartholomew-smith/commits/master/status | jq -r .state) | |
echo "waiting ($state)" | |
sleep 10 | |
done | |
echo $(curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/heitorpolidoro/bartholomew-smith/commits/master/status) | |
- name: Merge master into production | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git fetch --unshallow | |
git checkout production | |
git pull | |
git rebase --no-ff origin/master | |
- name: Push changes | |
run: | | |
git push origin production |