-
Notifications
You must be signed in to change notification settings - Fork 61
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
4 additions
and
8 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 |
---|---|---|
|
@@ -2,11 +2,6 @@ name: Publish official image | |
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release: | ||
description: Release version | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
release: | ||
|
@@ -39,8 +34,9 @@ jobs: | |
run: | | ||
remote=upstream | ||
remoteurl="https://$USER_NAME:[email protected]/$USER_NAME/official-images" | ||
branch="monica-${{ github.events.inputs.release }}" | ||
message="Update Monica to ${{ github.events.inputs.release }}" | ||
latest="$(curl -fsSL 'https://api.github.com/repos/monicahq/monica/releases/latest' | jq -r '.tag_name' | cut -c 2-)" | ||
branch="monica-v$latest" | ||
message="Update Monica to $latest" | ||
status=$(git status --porcelain) | ||
if [ -n "$status" ]; then | ||
|
@@ -53,7 +49,7 @@ jobs: | |
git remote remove $remote || true | ||
git remote add -f $remote $remoteurl || true | ||
git push $remote HEAD:$branch | ||
gh pr create --base docker-library:master --title "$message" --body "Update Monica to [${{ github.events.inputs.release }}](https://github.com/monicahq/monica/releases/tag/${{ github.events.inputs.release }})." | ||
gh pr create --base docker-library:master --title "$message" --body "Update Monica to [$latest](https://github.com/monicahq/monica/releases/tag/$latest)." | ||
else | ||
echo "Already up to date" | ||
fi | ||
|