Skip to content

Commit

Permalink
chore: fix empty stampy workflow (#2626)
Browse files Browse the repository at this point in the history
* chore: update empty stampy job name and script location

* fix: add checkout step to empty-stampy-buckets job

* fix: change map to forEach in empty-stampy-buckets script
  • Loading branch information
k80bowman authored Mar 6, 2024
1 parent fd574ca commit d6d15c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/empty-stampy-buckets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ on:
workflow_dispatch

jobs:
copy-to-stable:
empty-stampy-buckets:
runs-on: ubuntu-latest
environment: Stampy
steps:
- uses: actions/checkout@v3
- name: Empty Stampy signed and unsigned buckets
env:
STAMPY_ARN: ${{ secrets.STAMPY_ARN }}
Expand All @@ -21,4 +22,4 @@ jobs:
export AWS_ACCESS_KEY_ID=$(echo "${TEMP_ROLE}" | jq -r '.Credentials.AccessKeyId')
export AWS_SECRET_ACCESS_KEY=$(echo "${TEMP_ROLE}" | jq -r '.Credentials.SecretAccessKey')
export AWS_SESSION_TOKEN=$(echo "${TEMP_ROLE}" | jq -r '.Credentials.SessionToken')
node scripts/stampy/empty-stampy-buckets.js
node ./scripts/stampy/empty-stampy-buckets.js
2 changes: 1 addition & 1 deletion scripts/stampy/empty-stampy-buckets.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ fs.readdirSync('.')
.flatMap(f =>
[process.env.STAMPY_UNSIGNED_BUCKET, process.env.STAMPY_SIGNED_BUCKET].map(b => `aws s3 rm ${b}/${f}`),
)
.map(c => {
.forEach(c => {
exec(c, (error, stdout) => {
if (error) {
console.error(`exec error: ${error}`)
Expand Down

0 comments on commit d6d15c3

Please sign in to comment.