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 ade5ff2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
16 changes: 15 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,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 ade5ff2

Please sign in to comment.