feat: add mysql db to activity tracker (#35) #137
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: Provision | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "README.md" | |
- "docs/" | |
concurrency: provision | |
jobs: | |
provision: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PUSH_TOKEN_NEW }} | |
- run: git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* | |
- run: yarn | |
- name: Setup SSH Keys and known_hosts | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
run: | | |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | |
ssh-add - <<< "${{ secrets.EMPLOYEES_SSH_PRIVATE_KEY }}" | |
- name: Download private user list | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
run: yarn download-user-list | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v3 | |
with: | |
cli_config_credentials_token: ${{ secrets.TERRAFORM_API_TOKEN }} | |
terraform_wrapper: false | |
- name: Terraform Init | |
id: init | |
working-directory: terraform | |
run: terraform init | |
- name: Install doctl | |
uses: digitalocean/action-doctl@v2 | |
with: | |
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | |
- name: Save DigitalOcean kubeconfig with short-lived credentials | |
run: | | |
doctl kubernetes cluster kubeconfig save --expiry-seconds 600 etimo-staging | |
# doctl kubernetes cluster kubeconfig save --expiry-seconds 600 etimo-production | |
- run: yarn validate | |
- name: Terraform Validate | |
id: validate | |
working-directory: terraform | |
run: terraform validate -no-color | |
- run: yarn all:pre-terraform | |
- name: Terraform Apply | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
working-directory: terraform | |
run: terraform apply -auto-approve | |
- run: yarn all:post-terraform | |
- run: yarn send:kubeconfigs --mail-username ${{ secrets.MAIL_USERNAME }} --mail-password ${{ secrets.MAIL_PASSWORD }} | |
- name: Terraform Format | |
working-directory: terraform | |
run: terraform fmt -recursive | |
- name: Commit and push release | |
continue-on-error: true | |
run: | | |
git config --global user.email "" | |
git config --global user.name "release" | |
git add . | |
git commit -m "release: $(date +"%Y-%m-%dT%H:%M:%SZ") [skip ci]" | |
git push |