-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* app2 with jib * enable buildx-docker-cli-oci * enable buildx-docker-oci * fix context * fix file: app2/Dockerfile.builder * fix comment * try diff builder path * enable buildx-docker
- Loading branch information
Showing
22 changed files
with
634 additions
and
146 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build app | ||
|
||
env: | ||
ORG_GRADLE_PROJECT_githubUser: ${{ github.actor }} | ||
ORG_GRADLE_PROJECT_githubPackagesReadToken: ${{ secrets.GH_PACKAGES_READ_TOKEN }} | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
env: | ||
DOCKER_IMAGE: bartbednarek/multiple-docker-build-app | ||
concurrency: | ||
group: build-${{ github.ref }} | ||
cancel-in-progress: true | ||
steps: | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ vars.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '17' | ||
cache: 'gradle' | ||
|
||
- name: Build Project | ||
run: ./gradlew clean build --no-daemon | ||
|
||
- name: Set Docker Image | ||
run: echo "TF_VAR_image=${{ env.DOCKER_IMAGE }}:$GITHUB_RUN_NUMBER" >> $GITHUB_ENV | ||
|
||
- name: Docker Build & Push | ||
if: github.ref == 'refs/heads/master' | ||
run: | | ||
./gradlew :app:jib --no-daemon --image=$TF_VAR_image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 0 additions & 76 deletions
76
.github/workflows/buildx-docker-old-actions-versions-oci.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.dockerignore | ||
builder-image | ||
app2/Dockerfile | ||
app2/Dockerfile.builder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
FROM gradle:8.3.0-jdk17-jammy | ||
|
||
COPY --from=builder /home/gradle/.gradle/caches /home/gradle/.gradle/caches | ||
COPY --from=builder /home/gradle/app /home/gradle/app | ||
COPY --from=builder /home/gradle/multiple-docker-build /home/gradle/multiple-docker-build | ||
|
||
WORKDIR /home/gradle/app | ||
WORKDIR /home/gradle/multiple-docker-build | ||
|
||
ENTRYPOINT ["gradle", "cleanTest", "test", "--no-daemon"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.