Skip to content

Commit 6f005e1

Browse files
committed
.
1 parent 0826081 commit 6f005e1

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

dockerx.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,29 @@ on:
88
types: [opened, synchronize, reopened]
99

1010
jobs:
11-
gradle-cache:
11+
dockerx-build:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v3
15-
- name: Set up JDK 11
16-
uses: actions/setup-java@v1
15+
16+
- run: docker context create builders
17+
- uses: docker/setup-buildx-action@v2
18+
with:
19+
endpoint: builders
20+
21+
- uses: 'google-github-actions/auth@v1'
1722
with:
18-
java-version: 11
19-
- name: Cache Gradle packages
20-
uses: actions/cache@v3
23+
credentials_json: ${{ secrets.SA }}
24+
- uses: 'google-github-actions/setup-gcloud@v1'
25+
26+
- name: Configure Docker auth for gcloud command-line
27+
run: gcloud --quiet auth configure-docker && gcloud auth list
28+
29+
- name: Build and push image
30+
uses: docker/build-push-action@v3
2131
with:
22-
path: |
23-
~/.gradle/caches
24-
~/.gradle/wrapper
25-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle', '**/gradle-wrapper.properties') }}
26-
restore-keys: ${{ runner.os }}-gradle
27-
- name: Build and analyze
28-
run: ./gradlew build --info
32+
context: .
33+
file: ./Dockerfile
34+
push: true
35+
# tags: gcr.io/${{ secrets.PROJECT_ID }}/githubaction-java-dev:${{ env.IMAGE_TAG }}
36+
tags: gcr.io/${{ secrets.PROJECT_ID }}/githubaction-java-dev:latest

0 commit comments

Comments
 (0)