Skip to content

Commit

Permalink
Adjusted buildAndPushImage.yml so dev branch is also an image
Browse files Browse the repository at this point in the history
  • Loading branch information
Arikuma97 committed Aug 11, 2024
1 parent a934671 commit 2df91a6
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/buildAndPushImage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ name: buildAndPushImage

on:
push:
branches:
branches:
- 'main'

- 'dev'
pull_request:
branches:
- 'main'

env:
IMAGE_NAME: helm-plugin

IMAGE_TAG: ${{ github.ref == 'refs/heads/main' && 'latest' || 'testing' }}
jobs:
build-with-paketo-push-2-dockerhub:
runs-on: ubuntu-latest
Expand All @@ -24,8 +28,8 @@ jobs:

- name: Build app with pack CLI using Buildpack Cache image (see https://buildpacks.io/docs/app-developer-guide/using-cache-image/) & publish to Docker Hub
run: |
pack build index.docker.io/well5a/$IMAGE_NAME:latest \
pack build index.docker.io/well5a/$IMAGE_NAME:$IMAGE_TAG \
--builder paketobuildpacks/builder:base \
--path . \
--cache-image index.docker.io/well5a/$IMAGE_NAME-paketo-cache-image:latest \
--cache-image index.docker.io/well5a/$IMAGE_NAME-paketo-cache-image:$IMAGE_TAG \
--publish

0 comments on commit 2df91a6

Please sign in to comment.