generated from chiffre-io/template-library
-
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Ship it | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
ship-it: | ||
name: Ship it | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | ||
with: | ||
# Ensure full history is fetched to have a clear | ||
# path between next and master | ||
fetch-depth: 0 | ||
ref: next | ||
|
||
- name: Check master can fast-forward to next | ||
run: | | ||
git fetch origin master | ||
if ! git merge-base --is-ancestor master next; then | ||
echo "::error::master cannot be fast-forwarded to next. Aborting." | ||
exit 1 | ||
fi | ||
- name: Log commits to ship | ||
run: git log master..next --oneline | ||
|
||
- name: Move master to next branch | ||
run: | | ||
git checkout master | ||
git reset --hard next | ||
- name: Push updated master to origin | ||
run: | | ||
git push origin master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.SHIP_IT_TOKEN }} |