github-runners: add dependencies for slack sandbox codecov jobs #325
This file contains hidden or 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: Synchronize shared resources | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "*" | |
jobs: | |
infrastruct: | |
name: Infrastructural adaptations | |
runs-on: ubuntu-latest | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout this repo | |
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
with: | |
persist-credentials: false | |
- name: Configure aws credentials | |
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 # v5.0.0 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- name: Setup tofu tooling | |
uses: opentofu/setup-opentofu@000eeb8522f0572907c393e8151076c205fdba1b # v1.0.6 | |
- name: Prepare the cloud directory | |
working-directory: ./cloud | |
run: tofu init | |
- name: Ensure sensible setups | |
working-directory: ./cloud | |
run: | | |
tofu fmt -check | |
tofu validate | |
- name: Synchronize existing resources | |
working-directory: ./cloud | |
run: ./cloud.sh sync | |
- name: Plan the upcoming change | |
if: github.event_name == 'pull_request' | |
working-directory: ./cloud | |
run: tofu plan | |
- name: Actually apply the change | |
if: github.ref == 'refs/heads/main' | |
working-directory: ./cloud | |
run: tofu apply -auto-approve |