Skip to content
Unverified Commit 68eade9f authored by ysaito1001's avatar ysaito1001 Committed by GitHub
Browse files

Add a job to release workflow that checks the current actor for prod run (#3207)

## Motivation and Context
In our GitHub [release
workflow](https://github.com/smithy-lang/smithy-rs/actions/workflows/release.yml),
we require production runs to be triggered by the bot user
`aws-sdk-rust-ci`, which has special permissions. There are times we
have triggered a production run by our own actors and later realized it
wasn't the bot user.

Although there is a way to recover from that (logging in as the bot user
and rerunning the failed step), it's so much easier to add the initial
check to the workflow, especially when that's cheap to add. This PR,
therefore, adds a job `check-actor-for-prod-run` to the workflow.

Note that if it's a dry-run, `check-actor-for-prod-run` will be skipped
and the rest of the jobs in the workflow will be executed normally.

## Testing
Tested the following scenarios using the release workflow:
- making sure that `check-actor-for-prod-run` will be skipped in a
dry-run and the dry-run should succeed
([link](https://github.com/smithy-lang/smithy-rs/actions/runs/6886643811))
- making sure that `check-actor-for-prod-run` will kick in for a prod
run and let the prod run fail if run by me
([link](https://github.com/smithy-lang/smithy-rs/actions/runs/6886709963/job/18732793128))
- making sure that `check-actor-for-prod-run` will kick in for a prod
run and let the prod run proceed if run by the bot user
([link](https://github.com/smithy-lang/smithy-rs/actions/runs/6886738756/job/18732857316)
- I canceled the run as soon as I conformed the check worked)
----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
parent 44111311
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment