charon-package-published #474
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 AWS Canary Clusters | |
on: | |
repository_dispatch: | |
types: [charon-package-published] | |
workflow_dispatch: | |
inputs: | |
sha: | |
type: string | |
required: true | |
push: | |
branches: | |
- main | |
paths: | |
- templates/** | |
jobs: | |
deploy: | |
name: Deploy the canary clusters | |
runs-on: ubuntu-latest | |
# needs: delete-eks-canaries | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Configure aws credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: ${{ secrets.GHA_AWS_IAM_ROLE }} | |
aws-region: ${{ secrets.AWS_DEFAULT_REGION }} | |
- name: Update kube config | |
run: aws eks update-kubeconfig --region ${{ secrets.AWS_DEFAULT_REGION }} --name ${{ secrets.EKS_DEV_CLUSTER }} | |
- name: Get charon image tag | |
id: charon_image_tag | |
run: | | |
echo ::set-output name=tag::$(git rev-parse --short ${{ github.event.client_payload.sha }}) | |
- name: Delete canary-holesky-1 | |
run: ./scripts/delete-cluster.sh canary-holesky-1 | |
shell: bash | |
- name: Deploy canary-holesky-1 | |
run: ./scripts/deploy-cluster-with-charon-tag.sh canary-holesky-1 ${{ steps.charon_image_tag.outputs.tag }} | |
shell: bash |