Skip to content

Commit

Permalink
Remove workflow input (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin authored Nov 21, 2021
1 parent 13e31d3 commit 8134197
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ name: Publish official image

on:
workflow_dispatch:
inputs:
release:
description: Release version
required: true
type: string

jobs:
release:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 8134197

Please sign in to comment.