-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: greg pereira <[email protected]>
- Loading branch information
1 parent
4f22481
commit 89f7f61
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# name: Deploy To Prodcution | ||
# on: | ||
# release: | ||
# types: [released] | ||
|
||
name: test-wf | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
env: | ||
GHCR_REGISTRY: ghcr.io | ||
GHCR_UI_IMAGE_NAME: ${{ github.repository }}/ui | ||
QUAY_REGISTRY: quay.io | ||
QUAY_UI_IMAGE_NAME: instructlab-ui/ui | ||
GHCR_PATHSERVICE_IMAGE_NAME: ${{ github.repository }}/pathservice | ||
QUAY_PATHSERVICE_IMAGE_NAME: instructlab-ui/pathservice | ||
|
||
jobs: | ||
check_most_recent_pr_number: | ||
runs-on: ubuntu-latest | ||
environment: registry-creds | ||
permissions: | ||
packages: write | ||
contents: read | ||
attestations: write | ||
id-token: write | ||
steps: | ||
- name: Get Pull Request Number | ||
id: get_pr_number | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const pr = await github.rest.pulls.list({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
state: 'closed', | ||
head: `${context.repo.owner}:${process.env.GITHUB_HEAD_REF}`, | ||
per_page: 1 | ||
}); | ||
if (pr.data.length > 0) { | ||
return pr.data[0].number; | ||
} | ||
return ''; | ||
result-encoding: string |