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 authored and tadayosi committed Nov 28, 2023
1 parent a76c4b2 commit 23701fb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

jobs:
build:
if: github.repository_owner == 'hawtio'
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -30,4 +31,16 @@ 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 --help
docker login -u $USERNAME -p $PASSWORD quay.io
docker tag quay.io/hawtio/hawtio-online-example-camel-quarkus:latest quay.io/hawtio/hawtio-online-example-camel-quarkus:${{matrix.java}}
docker tag quay.io/hawtio/hawtio-online-example-camel-springboot:latest quay.io/hawtio/hawtio-online-example-camel-springboot:${{matrix.java}}
docker push quay.io/hawtio/hawtio-online-example-camel-quarkus:${{matrix.java}}
docker push quay.io/hawtio/hawtio-online-example-camel-springboot:${{matrix.java}}
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 23701fb

Please sign in to comment.