From 5494bf4cf8c0de8276416b33958a969a8e103e09 Mon Sep 17 00:00:00 2001 From: Alan Bridgeman Date: Sun, 28 Dec 2025 15:50:38 -0600 Subject: [PATCH] Added version incrementing logic back to CI/CD logic --- .forgejo/workflows/deploy.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml index 06fef9e..8d1b76f 100644 --- a/.forgejo/workflows/deploy.yml +++ b/.forgejo/workflows/deploy.yml @@ -61,30 +61,30 @@ jobs: echo "Because the remote version matches the local version, we need to increment the local version's patch number." # Increment the patch version of the local version (Ex. 1.0.0 -> 1.0.1) - #IFS='.' read -r major minor patch <<< "$LOCAL_VERSION" - #patch=$((patch + 1)) - #NEW_LOCAL_VERSION="$major.$minor.$patch" + IFS='.' read -r major minor patch <<< "$LOCAL_VERSION" + patch=$((patch + 1)) + NEW_LOCAL_VERSION="$major.$minor.$patch" - #echo "New Local Version: $NEW_LOCAL_VERSION" - #echo "Committing container version change..." - - #sed -i "s|version: $LOCAL_VERSION|version: $NEW_LOCAL_VERSION|g" metadata.yaml - - #LOCAL_VERSION=$NEW_LOCAL_VERSION + echo "New Local Version: $NEW_LOCAL_VERSION" + echo "Committing container version change..." + sed -i "s|version: $LOCAL_VERSION|version: $NEW_LOCAL_VERSION|g" metadata.yaml + + LOCAL_VERSION=$NEW_LOCAL_VERSION + # Update remote URL to use the GITHUB_TOKEN for authentication - #git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@git.bridgemanaccessible.ca/${{ github.repository }}.git + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@git.bridgemanaccessible.ca/${{ github.repository }}.git # Setup git user details for committing the version change and tag - #git config user.name "Forgejo Actions" - #git config user.email "actions@git.bridgemanaccessible.ca" + git config user.name "Forgejo Actions" + git config user.email "actions@git.bridgemanaccessible.ca" # Commit the version change to the `package.json` file - #git add metadata.yaml - #git commit -m "[Forgejo Actions] Update container version to $(yq -r '.version' metadata.yaml)" + git add metadata.yaml + git commit -m "[Forgejo Actions] Update container version to $(yq -r '.version' metadata.yaml)" # Push the changes to the repository - #git push origin HEAD:main + git push origin HEAD:main fi # Build and push the init container image to the repository