forked from OctopusSamples/RandomQuotes-K8s
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from BobJWalker/feature/one-test
Merging GH Actions into main
- Loading branch information
Showing
3 changed files
with
27 additions
and
31 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 |
---|---|---|
|
@@ -33,7 +33,7 @@ jobs: | |
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
additionalArguments: /overrideconfig mode=Mainline | ||
- name: update tag | ||
- name: update tag with latest version | ||
uses: richardsimko/update-tag@v1 | ||
with: | ||
tag_name: ${{ steps.determine_version.outputs.semVer }} | ||
|
@@ -58,13 +58,32 @@ jobs: | |
with: | ||
cmd: yq -i '.images.[0].newTag = "${{ steps.determine_version.outputs.semVer }}"' 'k8s/overlays/dev/kustomization.yaml' | ||
if: contains(github.ref, 'feature') | ||
- id: commit_dev_kustomize_change | ||
name: commit the dev kustomize change | ||
run : | | ||
git config --global user.name '${{ github.actor }}' | ||
git config --global user.email '${{ github.actor }}@users.noreply.github.com' | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | ||
git checkout "${GITHUB_REF:11}" | ||
git stage 'k8s/overlays/dev/kustomization.yaml' | ||
git commit -am "Updating dev overlay file to ${{ steps.determine_version.outputs.semVer }}" | ||
git tag 'dev-argo' --force | ||
git push --set-upstream origin ${GITHUB_REF:11} | ||
git push origin 'dev-argo' --force | ||
if: contains(github.ref, 'feature') | ||
- name: update test kustomize overlay | ||
uses: mikefarah/yq@master | ||
with: | ||
cmd: yq -i '.images.[0].newTag = "${{ steps.determine_version.outputs.semVer }}"' 'k8s/overlays/test/kustomization.yaml' | ||
if: github.ref == 'refs/heads/main' | ||
- name: commit the kustomize change for Argo to trigger | ||
uses: devops-infra/action-commit-push@master | ||
with: | ||
github_token: "${{ secrets.GITHUB_TOKEN }}" | ||
commit_message: "Updating the ${{ steps.EnvOverlay.outputs.KUSTOMIZE_ENVIRONMENT }} Kustomize overlay to ${{ steps.determine_version.outputs.semVer }}" | ||
if: github.ref == 'refs/heads/main' | ||
- id: commit_test_kustomize_change | ||
name: commit the test kustomize change | ||
run : | | ||
git config --global user.name '${{ github.actor }}' | ||
git config --global user.email '${{ github.actor }}@users.noreply.github.com' | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | ||
git checkout "${GITHUB_REF:11}" | ||
git stage 'k8s/overlays/test/kustomization.yaml' | ||
git commit -am "Updating test overlay file to ${{ steps.determine_version.outputs.semVer }}" | ||
git push --set-upstream origin ${GITHUB_REF:11} | ||
if: github.ref == 'refs/heads/main' |
This file was deleted.
Oops, something went wrong.
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