RC: (update) workflow file to create timestamp for tag
All checks were successful
Build and Update Flux / build-push-update (push) Successful in 17s
All checks were successful
Build and Update Flux / build-push-update (push) Successful in 17s
This commit is contained in:
@@ -24,6 +24,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Generate Timestamp Tag
|
||||||
|
run: echo "BUILD_TIME=$(date +'%Y%m%d-%H%M%S')" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Log in to Gitea Container Registry
|
- name: Log in to Gitea Container Registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
@@ -37,7 +40,7 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
${{ env.IMAGE_NAME }}:${{ gitea.sha }}
|
${{ env.IMAGE_NAME }}:${{ env.BUILD_TIME }}
|
||||||
${{ env.IMAGE_NAME }}:latest
|
${{ env.IMAGE_NAME }}:latest
|
||||||
|
|
||||||
- name: Checkout Infra Repository Manually
|
- name: Checkout Infra Repository Manually
|
||||||
@@ -60,7 +63,7 @@ jobs:
|
|||||||
cat charts/slashroot/values.yaml
|
cat charts/slashroot/values.yaml
|
||||||
|
|
||||||
# The sed command (Make sure the path matches perfectly!)
|
# The sed command (Make sure the path matches perfectly!)
|
||||||
sed -i "s/tag: .*/tag: ${{ gitea.sha }}/g" charts/slashroot/values.yaml
|
sed -i 's/tag: .*/tag: "${{ env.BUILD_TIME }}"/g' charts/slashroot/values.yaml
|
||||||
|
|
||||||
echo "--- TARGET FILE AFTER ---"
|
echo "--- TARGET FILE AFTER ---"
|
||||||
cat charts/slashroot/values.yaml
|
cat charts/slashroot/values.yaml
|
||||||
@@ -76,6 +79,6 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "✅ Changes detected! Committing and pushing..."
|
echo "✅ Changes detected! Committing and pushing..."
|
||||||
git commit -m "BOT: (deploy) slashroot-cc update ${{ gitea.sha }}"
|
git commit -m "BOT: (deploy) slashroot-cc update ${{ env.BUILD_TIME }}"
|
||||||
git push origin main
|
git push origin main
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user