Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump yaml from 2.2.1 to 2.3.4 #4

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
467 changes: 467 additions & 0 deletions .github/workflows/ci-run.yml

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions .github/workflows/deploy-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: ▶️ Deploy Master
on:
workflow_dispatch:

jobs:
build:
name: Build
uses: ./.github/workflows/tpl-images.yml
secrets: inherit
with:
image-tag: ${{ github.sha }}
run:
name: Run
uses: ./.github/workflows/tpl-start-env.yml
secrets: inherit
with:
git-ref: ${{ github.ref }}
env-type: master
workflow-id: ${{ github.run_id }}
deploy:
name: Deploy
needs:
- build
- run
uses: ./.github/workflows/tpl-deploy-app.yml
with:
env-type: master
env-id: ${{ needs.run.outputs.env-id }}
deployment-id: ${{ needs.run.outputs.deployment-id }}
image-tag: ${{ github.sha }}
workflow-id: ${{ github.run_id }}
# ---
chain-id: 11155111
network-name: sepolia
chain-name: sepolia
snapshotter-enabled: true
scheduler-enabled: true
vault-confirm-withdrawals-enabled: true
glm-claim-enabled: true
secrets: inherit
104 changes: 104 additions & 0 deletions .github/workflows/deploy-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
name: ♻ PR Deployment
on:
issue_comment:
types: [created]

jobs:
build:
name: Build
needs:
- run
uses: ./.github/workflows/tpl-images.yml
secrets: inherit
with:
image-tag: ${{ needs.run.outputs.sha }}

deploy:
name: Deploy
needs:
- run
- build
uses: ./.github/workflows/tpl-deploy-app.yml
with:
# ---
env-type: pr
image-tag: ${{ needs.run.outputs.sha }}
pull-request-id: ${{ needs.run.outputs.pr_id }}
workflow-id: ${{ github.run_id }}
env-id: ${{ needs.run.outputs.env }}
deployment-id: ${{ needs.run.outputs.deployment }}
# ---
deploy-contracts: true
chain-id: 1337
network-name: local
chain-name: localhost
snapshotter-enabled: true
scheduler-enabled: true
vault-confirm-withdrawals-enabled: true
glm-claim-enabled: true
secrets: inherit

run:
name: Run
if: github.event.issue.pull_request && contains(github.event.comment.body, '/deploy')
runs-on:
- metal
outputs:
sha: ${{ steps.comment-branch.outputs.head_sha }}
ref: ${{ steps.comment-branch.outputs.head_ref }}
pr_id: ${{ steps.get-pr-number.outputs.result }}
env: ${{ steps.start-deployment.outputs.env }}
deployment: ${{ steps.start-deployment.outputs.deployment_id }}
steps:
- name: Get PR branch
uses: xt0rted/pull-request-comment-branch@v2
id: comment-branch

- uses: actions/github-script@v7
id: get-pr-number
with:
result-encoding: string
script: |
return (
await github.rest.repos.listPullRequestsAssociatedWithCommit({
commit_sha: '${{ steps.comment-branch.outputs.head_sha }}',
owner: context.repo.owner,
repo: context.repo.repo,
})
).data[0].number;

- uses: actions/[email protected]
with:
path: __local
ref: ${{ steps.comment-branch.outputs.head_ref }}

- name: Get environment name
id: env-name
env:
CI_MERGE_REQUEST_IID: ${{ steps.get-pr-number.outputs.result }}
CI_PIPELINE_ID: ${{ github.run_id }}
run: |
set -ex

export CI_PROJECT_DIR="${GITHUB_WORKSPACE}/__local"

source ${CI_PROJECT_DIR}/ci/argocd/resolve_env.sh $ENV_TYPE
echo "DEPLOYMENT_ID=$DEPLOYMENT_ID" >> $GITHUB_OUTPUT
shell: bash

- name: (debug)
run: |
echo ${{ steps.get-pr-number.outputs.result }}
echo ${{ steps.env-name.outputs.DEPLOYMENT_ID }}
echo ${{ github.run_id }}

- name: start deployment
uses: bobheadxi/deployments@v1
id: start-deployment
with:
step: start
token: ${{ secrets.GH_BOT_TOKEN }}
env: ${{ steps.env-name.outputs.DEPLOYMENT_ID }}
ref: ${{ steps.comment-branch.outputs.head_ref }}
override: true
54 changes: 54 additions & 0 deletions .github/workflows/deploy-rc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
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/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
41 changes: 41 additions & 0 deletions .github/workflows/deploy-uat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: ▶️ Deploy UAT
on:
workflow_dispatch:

jobs:
build:
name: Build
uses: ./.github/workflows/tpl-images.yml
secrets: inherit
with:
image-tag: ${{ github.sha }}
run:
name: Run
uses: ./.github/workflows/tpl-start-env.yml
secrets: inherit
with:
git-ref: ${{ github.ref }}
env-type: uat
workflow-id: ${{ github.run_id }}
deploy:
name: Deploy
needs:
- build
- run
uses: ./.github/workflows/tpl-deploy-app.yml
with:
env-type: uat
env-id: ${{ needs.run.outputs.env-id }}
deployment-id: ${{ needs.run.outputs.deployment-id }}
image-tag: ${{ github.sha }}
workflow-id: ${{ github.run_id }}
# ---
chain-id: 11155111
network-name: sepolia
chain-name: sepolia
snapshotter-enabled: true
scheduler-enabled: true
vault-confirm-withdrawals-enabled: true
glm-claim-enabled: true
secrets: inherit
12 changes: 12 additions & 0 deletions .github/workflows/destroy-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: 🔻 Stop Master
on:
workflow_dispatch:

jobs:
run:
name: Run
uses: ./.github/workflows/tpl-destroy-env.yml
secrets: inherit
with:
env-type: master
12 changes: 12 additions & 0 deletions .github/workflows/destroy-uat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: 🔻 Stop UAT
on:
workflow_dispatch:

jobs:
run:
name: Run
uses: ./.github/workflows/tpl-destroy-env.yml
secrets: inherit
with:
env-type: uat
Loading