Skip to content

Commit

Permalink
chore: move dev images to a new package, set branch name correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
4141done committed Feb 26, 2024
1 parent 81b31fb commit a09b4c8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/dev-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,17 @@ jobs:
PR_NUMBER: ${{ github.event.issue.number }}

- name: Debug print out ref info
run: echo $(gh pr view $PR_NUMBER --repo ${{ github.repository }} --json)
run: echo $(gh pr view $PR_NUMBER --repo ${{ github.repository }})

- name: Checkout source code from Github
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ steps.getRef.outputs.pr_ref }}

- name: Get Branch Name
id: getBranchName
run: echo "branch_name=$(git branch --contains ${{ steps.getRef.outputs.pr_ref }} | awk 'NR==1' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" >> "$GITHUB_OUTPUT"

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand All @@ -75,7 +79,7 @@ jobs:
platforms: linux/amd64,linux/arm64
provenance: false
tags: |
ghcr.io/${{ github.repository }}/nginx-oss-s3-gateway:dev-${{ steps.getRef.outputs.pr_ref }}
ghcr.io/${{ github.repository }}/nginx-oss-s3-gateway-dev:${{ steps.getBranchName.outputs.branch_name }}
- name: Final Comment
run: |
Expand Down

0 comments on commit a09b4c8

Please sign in to comment.