-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat][resotocore] Bump inventory version on merge (#1815)
- Loading branch information
1 parent
b8c516c
commit cb8f2a8
Showing
1 changed file
with
23 additions
and
0 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 |
---|---|---|
|
@@ -290,3 +290,26 @@ jobs: | |
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/someengineering/fix-collect-single/actions/workflows/docker_build.yml/dispatches \ | ||
-d '{"ref":"main"}' | ||
- name: Authenticate with GitHub CLI | ||
if: github.event_name != 'pull_request' | ||
run: | | ||
gh auth login --with-token <<< "${{ secrets.SOME_CI_PAT }}" | ||
- name: Bump tag version | ||
if: github.event_name != 'pull_request' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.SOME_CI_PAT }} | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Some CI" | ||
git clone "https://[email protected]/someengineering/setup-infra.git" | ||
git_sha="${{ github.sha }}" | ||
short_sha="${git_sha:0:7}" | ||
echo "Use short SHA: $short_sha" | ||
# update the tag | ||
cd setup-infra | ||
yq eval ".images[] |= select(.name == \"someengineering/resotocore\").newTag |= \"${short_sha}\"" -i argocd/envs/dev/inventory/kustomization.yaml | ||
git add . | ||
git commit -m "Bump fix-inventory on dev to ${short_sha}" | ||
git push origin main |