Skip to content

Commit

Permalink
fixup: Control workflow runs
Browse files Browse the repository at this point in the history
  • Loading branch information
zenoando committed Nov 12, 2024
1 parent 32f2ac6 commit 70db13b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Build and publish

on:
pull_request:
types:
- closed
branches:
- main
release:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build the image
run: make build
Expand Down
5 changes: 4 additions & 1 deletion scripts/pr-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 70db13b

Please sign in to comment.