diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 013413d..7ac663b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,6 +2,8 @@ name: Build and publish on: pull_request: + types: + - closed branches: - main release: diff --git a/.github/workflows/pr-image.yaml b/.github/workflows/pr-image.yaml index 409b196..1fec672 100644 --- a/.github/workflows/pr-image.yaml +++ b/.github/workflows/pr-image.yaml @@ -24,6 +24,7 @@ jobs: with: registry: ghcr.io username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build the image run: make build diff --git a/scripts/pr-image.sh b/scripts/pr-image.sh index b69c375..b12dc46 100755 --- a/scripts/pr-image.sh +++ b/scripts/pr-image.sh @@ -13,7 +13,10 @@ IMAGE_NAME="$1" BRANCH="$2" echo "🏷️ Setting tags for image '${IMAGE_NAME}:${BRANCH}-prbase" -docker tag "${IMAGE_NAME}:base" "${IMAGE_NAME}:${BRANCH}-prbase" +docker tag "${IMAGE_NAME}:prbase" "${IMAGE_NAME}:${BRANCH}-prbase" +docker tag "${IMAGE_NAME}:prbase" "${IMAGE_NAME}:latest" echo "📤 Pushing '${IMAGE_NAME}:${BRANCH}-prbase'" docker push "${IMAGE_NAME}:${BRANCH}-prbase" +docker push "${IMAGE_NAME}:prbase" +docker push "${IMAGE_NAME}:latest"