Skip to content

chore(deps-dev): bump the development-dependencies group with 7 updates #210

chore(deps-dev): bump the development-dependencies group with 7 updates

chore(deps-dev): bump the development-dependencies group with 7 updates #210

Workflow file for this run

name: Remove preview
on:
pull_request_target:
types: [ closed ]
env:
BUCKET_NAME: ds-preview-stac-map-${{ github.event.number }}
AWS_ROLE_ARN: arn:aws:iam::552819999234:role/stac-map-gh-preview
AWS_REGION: us-west-2
permissions:
id-token: write
contents: read
issues: write
pull-requests: write
jobs:
remove:
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
- uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6
with:
role-to-assume: ${{ env.AWS_ROLE_ARN }}
aws-region: ${{ env.AWS_REGION }}
- name: Check if bucket exists
id: check_bucket
run: |
if aws s3 ls "s3://${{ env.BUCKET_NAME }}" 2>&1 | grep -q 'NoSuchBucket'; then
echo "Bucket does not exist."
echo "exists=false" >> "$GITHUB_OUTPUT"
else
echo "Bucket exists."
echo "exists=true" >> "$GITHUB_OUTPUT"
fi
- name: Empty the bucket
if: steps.check_bucket.outputs.exists == 'true'
run: |
aws s3 rm s3://$BUCKET_NAME --recursive --quiet
- name: Remove the bucket
if: steps.check_bucket.outputs.exists == 'true'
run: |
aws s3 rb s3://$BUCKET_NAME
- name: Remove PR comment
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
if: success()
with:
script: |
const { deleteComment } = require('./.github/workflows/github-pr-update.cjs')
await deleteComment({ github, context, core })