Scheduled jobs: Bucket cleanup #407
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: "Scheduled jobs: Bucket cleanup" | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string. | |
# Run every day at 3:00PM UTC. | |
- cron: '0 15 * * *' | |
workflow_dispatch: | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
jobs: | |
all: | |
env: | |
GOPATH: ${{ github.workspace }}/go | |
name: Bucket cleanup | |
environment: production | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18.x' | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 1.20.x | |
- name: Configure Git | |
run: | | |
git config --global url."https://${{ secrets.PULUMI_BOT_TOKEN }}:[email protected]/pulumi/pulumi-hugo-internal".insteadOf "https://github.com/pulumi/pulumi-hugo-internal" | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::388588623842:role/ContinuousDelivery | |
role-session-name: docs-cleanup | |
role-duration-seconds: 7200 | |
aws-region: us-west-2 | |
- name: Run make ci_bucket_cleanup | |
run: make ci_bucket_cleanup | |
env: | |
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | |
PULUMI_STACK_NAME: ${{ vars.PULUMI_STACK_NAME }} | |
SLACK_ACCESS_TOKEN: ${{ secrets.SLACK_ACCESS_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DEPLOYMENT_ENVIRONMENT: ${{ vars.DEPLOYMENT_ENVIRONMENT }} |