Skip to content

Commit

Permalink
Create a job for pushing images automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
mmuzikar committed Nov 28, 2023
1 parent a76c4b2 commit 890ccfc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ on:
push:
branches:
- main
- build-job
paths-ignore:
- '**.md'

jobs:
build:
if: github.repository_owner == 'hawtio'
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -30,4 +32,12 @@ jobs:
cache: 'maven'
- name: Build
run: |
mvn --batch-mode --no-transfer-progress install
mvn --batch-mode --no-transfer-progress install -Djkube.build.strategy=docker
- name: Push image to Quay.io
env:
USERNAME: ${{ secrets.QUAY_USERNAME }}
PASSWORD: ${{ secrets.QUAY_PASSWORD }}
run: |
docker login -u $USERNAME -p $PASSWORD quay.io
docker push quay.io/hawtio/hawtio-online-example-camel-quarkus:latest
docker push quay.io/hawtio/hawtio-online-example-camel-springboot:latest
8 changes: 8 additions & 0 deletions camel-springboot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@
<groupId>org.eclipse.jkube</groupId>
<artifactId>kubernetes-maven-plugin</artifactId>
<version>${kubernetes-maven-plugin-version}</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
<configuration>
<resources>
<env>
Expand Down

0 comments on commit 890ccfc

Please sign in to comment.