Skip to content

Commit

Permalink
Merge pull request #8 from BobJWalker/feature/one-test
Browse files Browse the repository at this point in the history
Merging GH Actions into main
  • Loading branch information
BobJWalker authored Feb 12, 2024
2 parents 554d406 + d94f620 commit efeb4a4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 31 deletions.
33 changes: 26 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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'
23 changes: 0 additions & 23 deletions .github/workflows/deploy-dev-argo.yml

This file was deleted.

2 changes: 1 addition & 1 deletion k8s/overlays/dev/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ secretGenerator:
images:
- name: bobjwalker99/randomquotes-k8s
newName: bobjwalker99/randomquotes-k8s
newTag: "0.1.53-triggers.2"
newTag: "0.1.56-one-test.87"
patches:
- target:
kind: Ingress
Expand Down

0 comments on commit efeb4a4

Please sign in to comment.