-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Docker CI workflow by removing unnecessary git commit and ta…
…g steps to streamline the process
- Loading branch information
1 parent
1402437
commit 7fbd6f3
Showing
1 changed file
with
0 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,30 +34,6 @@ jobs: | |
COMMIT=$(echo "${{ steps.get_commit.outputs.commit }}") | ||
sed -i "\$a<!-- Version: $VERSION, Commit ID: $COMMIT -->" views/index.ejs | ||
- name: Commit changes | ||
run: | | ||
git config --global user.name 'github-actions' | ||
git config --global user.email '[email protected]' | ||
git add views/index.ejs | ||
git commit -m "Add version and commit ID" | ||
git push | ||
- name: Delete existing tag | ||
if: steps.get_version.outputs.version != 'no-tag' | ||
run: | | ||
VERSION=$(echo "${{ steps.get_version.outputs.version }}") | ||
git tag -d $VERSION || true | ||
git push origin :refs/tags/$VERSION || true | ||
- name: Create and push new tag | ||
run: | | ||
VERSION=$(echo "${{ steps.get_version.outputs.version }}") | ||
if [ "$VERSION" != "no-tag" ]; then | ||
NEW_TAG="${VERSION}-$(date +'%Y%m%d%H%M%S')" | ||
git tag $NEW_TAG | ||
git push origin $NEW_TAG | ||
fi | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | ||
|