From a09b4c8c8a4fccba5e758e5668b4c6cd06cefebc Mon Sep 17 00:00:00 2001 From: Javier Evans Date: Mon, 26 Feb 2024 14:05:09 -0800 Subject: [PATCH] chore: move dev images to a new package, set branch name correctly --- .github/workflows/dev-preview.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev-preview.yml b/.github/workflows/dev-preview.yml index a7b47b6d..ca36343e 100644 --- a/.github/workflows/dev-preview.yml +++ b/.github/workflows/dev-preview.yml @@ -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 @@ -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: |