Skip to content

Commit

Permalink
Fix repo url (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin authored Nov 21, 2021
1 parent 8134197 commit 0239252
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
working-directory: official-images
run: |
remote=upstream
remoteurl="https://$USER_NAME:[email protected]/$USER_NAME/official-images"
remoteurl="https://$USER_NAME:[email protected]/$USER_NAME/official-images.git"
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"
Expand All @@ -44,12 +44,11 @@ jobs:
git add library/monica
git config user.email $USER_EMAIL
git config user.name $USER_NAME
git checkout -b $branch
git commit -m "$message"
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 [$latest](https://github.com/monicahq/monica/releases/tag/$latest)."
gh pr create --base docker-library:master --head $USER_NAME:$branch --title "$message" --body "Update Monica to [$latest](https://github.com/monicahq/monica/releases/tag/$latest)."
else
echo "Already up to date"
fi
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ name: Release update

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

jobs:
release:
Expand All @@ -21,14 +16,15 @@ jobs:

- name: Run update script
run: |
./update.sh ${{ github.events.inputs.release }}
./update.sh
- name: Update
run: |
remote=upstream
remoteurl="https://$USER_NAME:[email protected]/monicahq/docker"
branch="release-${{ github.events.inputs.release }}"
message="Update to ${{ github.events.inputs.release }}"
remoteurl="https://$USER_NAME:[email protected]/monicahq/docker.git"
latest="$(curl -fsSL 'https://api.github.com/repos/monicahq/monica/releases/latest' | jq -r '.tag_name' | cut -c 2-)"
branch="release-$latest"
message="Update to $latest"
status=$(git status --porcelain)
if [ -n "$status" ]; then
Expand All @@ -41,7 +37,7 @@ jobs:
git remote remove $remote || true
git remote add -f $remote $remoteurl || true
git push $remote HEAD:$branch
gh pr create --title "$message" --body "Update Monica to [${{ github.events.inputs.release }}](https://github.com/monicahq/monica/releases/tag/${{ github.events.inputs.release }})."
gh pr create --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 0239252

Please sign in to comment.