build(deploy): reoder steps
This commit is contained in:
parent
26042033f7
commit
705acfd575
@ -61,9 +61,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [docker, tests] # require tests to pass before deploy runs
|
needs: [docker, tests] # require tests to pass before deploy runs
|
||||||
steps:
|
steps:
|
||||||
- name: Install kustomize
|
- uses: https://github.com/actions/checkout.git@v4
|
||||||
run: |
|
- name: Get short hash from git repository
|
||||||
curl -L https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv5.3.0/kustomize_v5.3.0_linux_amd64.tar.gz -o kustomize.tar.gz && tar -xzf kustomize.tar.gz
|
id: git
|
||||||
|
run: echo "::set-output name=short_hash::$(git rev-parse --short HEAD)"
|
||||||
- uses: https://github.com/actions/checkout.git@v4
|
- uses: https://github.com/actions/checkout.git@v4
|
||||||
with:
|
with:
|
||||||
ssh-key: '${{ secrets.VLACH_XYZ_DEPLOY }}'
|
ssh-key: '${{ secrets.VLACH_XYZ_DEPLOY }}'
|
||||||
@ -72,12 +73,11 @@ jobs:
|
|||||||
ref: 'master'
|
ref: 'master'
|
||||||
github-server-url: 'ssh://git.nanobyte.cz'
|
github-server-url: 'ssh://git.nanobyte.cz'
|
||||||
ssh-known-hosts: 'git.nanobyte.cz ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC3senpFPTYk75y73d1xL4XEDBe5AcLJ+GLEA+XTMpMiLsociwUeJZCJZoRUsZBH1bSvlgT23wlHtGJvDARygCBX/rZKKIb0KdD5qYgbtCzdmyg1Aw6+RNbgsOZuuDqh1HCLftj6PZWKXfEyp1rLjVCJEBmK2+iC54VjGTrm/0D3Mi1Tzpbmz0U+SqiZpNmC4GJu3riyxcXBrySsEZjWFcrUGSfVW9/MzzNk6relemGrkvBFDh6+lcx5bvPi3wamm0dlS+ySB9GhkGMukjCHHGLleRRZB3hf8ClbiMrod0KXwG1RQzqBIn3or4AUrl2ExIeA+olBTGIooy1sf/s8qBSGytYwU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w=='
|
||||||
- uses: https://github.com/actions/checkout.git@v4
|
|
||||||
- name: Get short hash from git repository
|
|
||||||
id: git
|
|
||||||
run: echo "::set-output name=short_hash::$(git rev-parse --short HEAD)"
|
|
||||||
- name: configure git
|
- name: configure git
|
||||||
run: git config --global user.email "gitea-bot@nanobyte.cz" && git config --global user.name "Gitea Bot"
|
run: git config --global user.email "gitea-bot@nanobyte.cz" && git config --global user.name "Gitea Bot"
|
||||||
|
- name: Install kustomize
|
||||||
|
run: |
|
||||||
|
curl -L https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv5.3.0/kustomize_v5.3.0_linux_amd64.tar.gz -o kustomize.tar.gz && tar -xzf kustomize.tar.gz
|
||||||
- name: Update images
|
- name: Update images
|
||||||
run: |
|
run: |
|
||||||
cd vlach_xyz_deploy && cd kubernetes/staging/ && ../../../kustomize edit set image web=git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/ovlach_frontend:${{steps.git.outputs.short_hash}} && git add . && git commit -m "upgrade ovlach_frontend -> ${{steps.git.outputs.short_hash}}" && git push origin master
|
cd vlach_xyz_deploy && cd kubernetes/staging/ && ../../../kustomize edit set image web=git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/ovlach_frontend:${{steps.git.outputs.short_hash}} && git add . && git commit -m "upgrade ovlach_frontend -> ${{steps.git.outputs.short_hash}}" && git push origin master
|
||||||
|
Loading…
Reference in New Issue
Block a user