AWS Kubernetes deployment #749
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: AWS Kubernetes deployment | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Import Secrets | |
uses: hashicorp/vault-action@v2.3.0 | |
with: | |
url: ${{ secrets.VAULT_ADDR }} | |
token: ${{ secrets.CI_SECRET_READER_PERIODIC_TOKEN }} | |
caCertificate: ${{ secrets.VAULTCA }} | |
secrets: | | |
ci/data/gh-workflows/universal-resolver-cluster dif-cluster-kube-config | KUBE_CONFIG_DATA ; | |
ci/data/gh-workflows/universal-resolver-cluster aws-access-key-id | AWS_ACCESS_KEY_ID ; | |
ci/data/gh-workflows/universal-resolver-cluster aws-secret-access-key | AWS_SECRET_ACCESS_KEY ; | |
ci/data/gh-workflows/universal-resolver-cluster rpc-url-testnet | RPC_URL_TESTNET ; | |
ci/data/gh-workflows/universal-resolver-cluster rpc-cert-testnet | RPC_CERT_TESTNET ; | |
ci/data/gh-workflows/deployment-status slack-webhook-url | SLACK_WEBHOOK_URL | |
- name: Deploy to AWS | |
uses: ./ci/deploy-k8s-aws | |
env: | |
KUBE_CONFIG_DATA: ${{secrets.KUBE_CONFIG_DATA_BASE64_UNI_RESOLVER_PROD}} | |
AWS_ACCESS_KEY_ID: ${{env.AWS_ACCESS_KEY_ID}} | |
AWS_SECRET_ACCESS_KEY: ${{env.AWS_SECRET_ACCESS_KEY}} | |
RPC_URL_TESTNET: ${{env.RPC_URL_TESTNET}} | |
RPC_CERT_TESTNET: ${{env.RPC_CERT_TESTNET}} | |
- name: Slack notification | |
if: failure() # Send message only on failure | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: ${{ job.status }} | |
fields: repo,commit,action,eventName,ref,workflow # selectable (default: repo,message) | |
env: | |
SLACK_WEBHOOK_URL: ${{ env.SLACK_WEBHOOK_URL }} # required |