pr targets for 12/merge #26
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: Upload Impacted Targets | |
run-name: pr targets for ${{ github.ref_name }} | |
on: pull_request | |
jobs: | |
compute_pr_targets: | |
name: compute | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
lfs: truefilenames.sort(); | |
- uses: dtolnay/rust-toolchain@stable | |
- name: trunk install | |
uses: trunk-io/trunk-action/install@v1 | |
with: | |
tools: gh jq | |
- name: download mq | |
run: | | |
gh release download --pattern='*.gz' --output mq.gz --clobber | |
tar -xf mq.gz | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build --release | |
run: cargo build | |
- name: compute targets | |
id: targes | |
run: | | |
echo "::group::GitHub Json" | |
TEMP_FILE=$(mktemp) | |
echo '${{ toJSON(github) }}' > $TEMP_FILE | |
echo "::endgroup::" | |
cargo run -- upload-targets --github-json=$TEMP_FILE | |
env: | |
TRUNK_TOKEN: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |