feat!: remove challengeContainerOptions, add containerId to startChal… #7
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 Bundle to Dev | |
on: | |
push: | |
branches: [master] | |
jobs: | |
terraform-dev: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
environment: DEV | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Configure AWS Actions Credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: arn:aws:iam::914054469264:role/github-actions-admin-dev | |
aws-region: us-east-2 | |
- name: Configure AWS Terraform Credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: arn:aws:iam::914054469264:role/terraform-admin | |
aws-region: us-east-2 | |
role-chaining: true | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: 1.5.6 | |
- name: Terraform Init | |
id: init | |
run: terraform init -backend-config=dev.tfbackend | |
working-directory: terraform/ | |
continue-on-error: false | |
- name: Terraform Apply Dev | |
id: plan | |
run: terraform apply -auto-approve | |
working-directory: terraform/ | |
continue-on-error: false | |
env: | |
TF_VAR_env: dev | |
TF_VAR_r2_access_key: ${{secrets.TF_R2_ACCESS_KEY}} | |
TF_VAR_r2_secret_key: ${{secrets.TF_R2_SECRET_KEY}} | |
build-release: | |
runs-on: ${{ matrix.os }} | |
permissions: | |
id-token: write | |
contents: read | |
actions: read | |
environment: DEV | |
strategy: | |
matrix: | |
node: ['20.x'] | |
os: [ubuntu-latest] | |
env: | |
CI: 1 | |
HUSKY: 0 # disables husky hooks | |
NPM_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }} | |
needs: | |
- terraform-dev | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_SEMANTIC_RELEASE_PAT }} | |
- uses: AnimMouse/setup-rclone@v1 | |
- name: Configure AWS Actions Credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: arn:aws:iam::914054469264:role/github-actions-admin-dev | |
aws-region: us-east-2 | |
- name: Configure AWS Terraform Credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: arn:aws:iam::914054469264:role/terraform-admin | |
aws-region: us-east-2 | |
role-chaining: true | |
- name: Use Node ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install Deps (with cache) | |
uses: bahmutov/npm-install@v1 | |
with: | |
install-command: yarn --immutable --no-progress --ignore-scripts | |
- name: Get New Version | |
id: get-new-version | |
uses: mathieudutour/github-tag-action@v5.2 | |
with: | |
dry_run: true | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Bump Version | |
run: make update-version NEW_VERSION=${{ steps.get-new-version.outputs.new_version }} | |
- name: Build | |
run: make build | |
env: | |
SKIP_INSTALL: 1 # install with cache was done already | |
- name: Deploy CDN Bundle to Dev | |
run: make upload-bundle | |
env: | |
BLOB: true | |
CLOUDFLARE: true | |
ENVIRONMENT: dev | |
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_PAT }} | |
R2_ACCESS_KEY: ${{secrets.R2_ACCESS_KEY}} | |
R2_SECRET_KEY: ${{secrets.R2_SECRET_KEY}} | |
create-pre-release: | |
runs-on: ubuntu-latest | |
needs: | |
- build-release | |
- terraform-dev | |
strategy: | |
matrix: | |
node: [ '20.x' ] | |
steps: | |
- name: Version and Tag | |
id: version-and-tag | |
uses: mathieudutour/github-tag-action@v5.2 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Generate Release Notes | |
id: release-notes | |
uses: actions/github-script@v6 | |
env: | |
NEW_RELEASE_TAG: ${{ steps.version-and-tag.outputs.new_tag }} | |
with: | |
result-encoding: string | |
script: | | |
const { NEW_RELEASE_TAG } = process.env; | |
const latestRelease = await github.rest.repos.getLatestRelease({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
}); | |
const releaseNotes = await github.rest.repos.generateReleaseNotes({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
tag_name: NEW_RELEASE_TAG, | |
previous_tag_name: latestRelease.data.tag_name, | |
}); | |
return releaseNotes.data.body; | |
- name: Create Pre-Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
prerelease: true | |
generate_release_notes: false | |
body: ${{ steps.release-notes.outputs.result }} | |
tag_name: ${{ steps.version-and-tag.outputs.new_tag }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Stop Deploy Message | |
if: always() | |
uses: Basis-Theory/github-actions/deploy-slack-action@master | |
with: | |
slack-api-token: ${{ secrets.SLACK_DUCKBOT_API_KEY }} | |
channel: ${{ vars.SLACK_DUCKBOT_DEV_DEPLOY_CHANNEL_ID }} | |
status: 'done' |