-
Notifications
You must be signed in to change notification settings - Fork 7
50 lines (42 loc) · 1.54 KB
/
deploy-rc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
name: ▶️ Deploy Release Candidate
on:
workflow_dispatch:
env:
ARGO_REPOSITORY: "https://doesnt-matter:${{ secrets.GITLAB_PAT_OCTANT_K8S_DEVOPS_REPOSITORY_WRITE }}@gitlab.com/golemfoundation/devops/iac/k8s/wildland-k8s-devops.git"
ARGO_REPOSITORY_BRANCH: "github/octant-release-candidate"
IMAGE_TAG: "${{ github.sha }}"
GITLAB_PAT_OCTANT_K8S_DEVOPS_REPOSITORY_WRITE: "${{ secrets.GITLAB_PAT_OCTANT_K8S_DEVOPS_REPOSITORY_WRITE }}"
jobs:
build:
name: Build
uses: ./.github/workflows/tpl-images.yml
secrets: inherit
with:
image-tag: ${{ github.sha }}
git-ref: ${{ github.ref }}
deploy:
name: Deploy
needs:
- build
runs-on:
- general
container:
image: registry.gitlab.com/golemfoundation/devops/container-builder/gitops-builder:2ea6d57c
credentials:
username: "doesnt-matter"
password: "${{ secrets.GITLAB_PAT_CONTAINER_BUILDER_DOCKER_IMAGES_READ }}"
steps:
- uses: actions/[email protected]
- run : |
set -ex
git config --global user.name "Wildland Automation"
git config --global user.email "[email protected]"
GIT_DIR=`mktemp -d`
git clone -b $ARGO_REPOSITORY_BRANCH $ARGO_REPOSITORY $GIT_DIR
pushd $GIT_DIR
yq -y -i -e ".[].value.value = \"$IMAGE_TAG\"" mainnet/octant-image.values.yaml
git add mainnet/octant-image.values.yaml
git commit -m "Changed octant image tag to $IMAGE_TAG at $(date +%Y-%m-%d)" || true
git push
shell: bash