Skip to content

Commit

Permalink
workflow tweaks to update dockerhub description
Browse files Browse the repository at this point in the history
  • Loading branch information
heavygee committed Oct 6, 2024
1 parent a192880 commit 0a40418
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Get latest version from version_info.json
id: version
run: |
version=$(jq -r 'keys | map(.) | sort_by(.) | last' version_info.json)
version=$(jq -r 'keys | map(.) | sort -V | last' version_info.json)
echo "Version: $version"
echo "VERSION=$version" >> $GITHUB_ENV
Expand Down
4 changes: 1 addition & 3 deletions helpers/increment_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,21 +147,19 @@ jq --arg version "$new_version" --arg desc "$description" \
exit 1
}

# Add all modified files to staging area (including unstaged ones)
# Commit and push changes
git add -A || {
echo "Git add failed. Reverting to previous state..."
git checkout -- version_info.json package.json package-lock.json
exit 1
}

# Use the provided description as the commit message
git commit -m "$description" || {
echo "Git commit failed. Reverting to previous state..."
git checkout -- version_info.json package.json package-lock.json
exit 1
}

# Push the changes to the main branch
git push origin main || {
echo "Git push failed. Reverting local version changes..."
git reset --hard "$initial_state"
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hello-dalle-discordbot",
"version": "1.11.2",
"version": "1.11.3",
"description": "Hello Dall-E will produce welcome images for your new users. Now with a wildcard that will 'prompt different' as you specify",
"main": "bot.js",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions version_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,9 @@
"1.10.0": {
"description": "refactor to clear up the use of a 'welcome' and 'profile' channel for the individual message options.",
"changelog_url": "https://github.com/heavygee/hello-dalle-discordbot/releases/tag/v1.10.0"
},
"1.11.3": {
"description": "workflow tweaks to update dockerhub description",
"changelog_url": "https://github.com/heavygee/hello-dalle-discordbot/releases/tag/v1.11.3"
}
}

0 comments on commit 0a40418

Please sign in to comment.