Skip to content

Commit

Permalink
chore: run actionlint & shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
jenstroeger committed Feb 28, 2023
1 parent 6b337a3 commit 908ea3f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/sync-with-upstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
&& cat repo/.github/workflows/.template_version || echo "v0.0.0")
echo "Latest version is $LATEST_VERSION and current version is $CURRENT_VERSION."
if [ $CURRENT_VERSION == $LATEST_VERSION ]; then
if [ "$CURRENT_VERSION" == "$LATEST_VERSION" ]; then
echo "Unable to find a new version, exiting..."
else
Expand All @@ -60,22 +60,22 @@ jobs:
# Check if the branch exists in the current repo.
cd repo/
if [ $(git rev-parse --verify origin/sync-$LATEST_VERSION 2>/dev/null) ]; then
if [ "$(git rev-parse --verify origin/sync-$LATEST_VERSION 2>/dev/null)" ]; then
echo "Branch sync-$LATEST_VERSION already exists. Exiting..."
exit 0
fi
# Create a branch, commit, and push the changeset.
git checkout -b sync-$LATEST_VERSION
echo $LATEST_VERSION > .github/workflows/.template_version
git checkout -b sync-"$LATEST_VERSION"
echo "$LATEST_VERSION" > .github/workflows/.template_version
git add .
git config --global user.name $USER_NAME
git config --global user.email $USER_EMAIL
git config --global user.name "$USER_NAME"
git config --global user.email "$USER_EMAIL"
git config --list --global # For debug purposes.
git commit --message "chore: sync with template"
git push --set-upstream origin sync-$LATEST_VERSION
git push --set-upstream origin sync-"$LATEST_VERSION"
# Create the pull request.
gh pr create --base main --title "chore: sync with package template $LATEST_VERSION" \
--body "This PR was automatically generated." --head sync-$LATEST_VERSION
--body "This PR was automatically generated." --head sync-"$LATEST_VERSION"
fi

0 comments on commit 908ea3f

Please sign in to comment.