▶️ Deploy Release Candidate #2
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
--- | |
name: ▶️ Deploy Release Candidate | |
on: | |
workflow_dispatch: | |
env: | |
ARGO_REPOSITORY: "https://wildland-bot:${{ secrets.HOUSEKEEPER_CI_TOKEN }}@gitlab.com/golemfoundation/devops/iac/k8s/wildland-k8s-devops.git" | |
ARGO_REPOSITORY_BRANCH: "github/octant-release-candidate" | |
IMAGE_TAG: "${{ github.sha }}" | |
HOUSEKEEPER_GPG_KEY: "${{ secrets.HOUSEKEEPER_GPG_KEY }}" | |
HOUSEKEEPER_GPG_KEY_ID: "${{ secrets.HOUSEKEEPER_GPG_KEY_ID }}" | |
HOUSEKEEPER_NAME: "${{ vars.HOUSEKEEPER_NAME }}" | |
HOUSEKEEPER_EMAIL: "${{ secrets.HOUSEKEEPER_EMAIL }}" | |
jobs: | |
build: | |
name: Build | |
uses: ./.github/workflows/tpl-images.yml | |
secrets: inherit | |
with: | |
image-tag: ${{ github.sha }} | |
deploy: | |
name: Deploy | |
needs: | |
- build | |
runs-on: | |
- metal | |
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 | |
gpg --import <(echo $HOUSEKEEPER_GPG_KEY | base64 -d) | |
git config --global user.name "$HOUSEKEEPER_NAME" | |
git config --global user.email "$HOUSEKEEPER_EMAIL" | |
git config --global user.signingkey $HOUSEKEEPER_GPG_KEY_ID | |
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 -S -m "Changed octant image tag to $IMAGE_TAG at $(date +%Y-%m-%d)" || true | |
git push | |
shell: bash |