.github/workflows/pr.yml #238
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
on: | |
pull_request: | |
branches: | |
- "main" | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
publish: | |
runs-on: "ubuntu-latest-m" | |
concurrency: | |
cancel-in-progress: true | |
group: main-pr-${{ github.event.pull_request.number || github.ref }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v20 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- uses: cachix/cachix-action@v12 | |
with: | |
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
name: composable | |
skipAddingSubstituter: false | |
skipPush: false | |
- run: | | |
export TF_VAR_GITHUB_TOKEN=${{ secrets.TF_VAR_GITHUB_TOKEN }} | |
export TF_VAR_AWS_ACCESS_KEY_ID=${{ secrets.TF_VAR_AWS_ACCESS_KEY_ID }} | |
export TF_VAR_AWS_SECRET_ACCESS_KEY=${{ secrets.TF_VAR_AWS_SECRET_ACCESS_KEY }} | |
export TF_VAR_MANTIS_COSMOS_MNEMONIC_SOLVER=${{ secrets.TF_VAR_MANTIS_COSMOS_MNEMONIC_SOLVER }} | |
export TF_VAR_CACHIX_AUTH_TOKEN=${{ secrets.TF_VAR_CACHIX_AUTH_TOKEN }} | |
export TF_VAR_MANTIS_COSMOS_MNEMONIC_SOLVER_SIMULATOR=${{ secrets.TF_VAR_MANTIS_COSMOS_MNEMONIC_SOLVER_SIMULATOR }} | |
export TF_VAR_CI_SSH_KEY=${{ secrets.TF_VAR_CI_SSH_KEY }} | |
export GITHUB_TOKEN=${{ secrets.TF_VAR_GITHUB_TOKEN }} | |
export AWS_ACCESS_KEY_ID=${{ secrets.TF_VAR_AWS_ACCESS_KEY_ID }} | |
export AWS_SECRET_ACCESS_KEY=${{ secrets.TF_VAR_AWS_SECRET_ACCESS_KEY }} | |
export MANTIS_COSMOS_MNEMONIC=${{ secrets.TF_VAR_MANTIS_COSMOS_MNEMONIC_SOLVER }} | |
export CI_SSH_KEY=${{ secrets.TF_VAR_CI_SSH_KEY }} | |
nix run .#terraform --impure -- init | |
nix run .#terraform --impure -- plan |