[DOC] Clarify PREFIX
usage in environment variables
#393
Workflow file for this run
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: Review builds | |
on: | |
# NOTE: github.event context is pull_request payload: | |
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request | |
pull_request: | |
types: | |
- labeled | |
jobs: | |
build: | |
if: >- | |
!github.event.repository.fork | |
&& github.event.label.name == 'build::review' | |
strategy: | |
matrix: | |
include: | |
- runner: ubuntu-latest | |
subdir: linux-64 | |
- runner: macos-latest | |
subdir: osx-64 | |
- runner: windows-latest | |
subdir: win-64 | |
runs-on: ${{ matrix.runner }} | |
steps: | |
- name: Remove build label | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.CANARY_ACTION_TOKEN }} | |
script: | | |
const { data: pullRequest } = await github.rest.pulls.get({ | |
...context.repo, | |
pull_number: context.issue.number, | |
}) | |
const buildLabel = '${{ github.event.label.name }}' | |
const labels = pullRequest.labels.map(label => label.name) | |
const hasBuildLabel = labels.includes(buildLabel) | |
if (hasBuildLabel) { | |
await github.rest.issues.removeLabel({ | |
...context.repo, | |
issue_number: context.issue.number, | |
name: buildLabel, | |
}) | |
} | |
# Clean checkout of specific git ref needed for package metadata version | |
# which needs env vars GIT_DESCRIBE_TAG and GIT_BUILD_STR: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref }} | |
clean: true | |
fetch-depth: 0 | |
- name: Create and upload review build | |
uses: conda/actions/[email protected] | |
with: | |
package-name: ${{ github.event.repository.name }} | |
subdir: ${{ matrix.subdir }} | |
anaconda-org-channel: conda-canary | |
anaconda-org-label: ${{ github.repository_owner }}-${{ github.event.repository.name }}-pr-${{ github.event.number }} | |
anaconda-org-token: ${{ secrets.ANACONDA_ORG_TOKEN }} | |
comment-headline: Review build status | |
comment-token: ${{ secrets.CANARY_ACTION_TOKEN }} |