Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Commit cecfc8c

Browse files
committed
added release action
1 parent 487e310 commit cecfc8c

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

.github/workflows/release_images.yaml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Docker Build images on Tag
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Set up gcloud CLI
16+
uses: google-github-actions/[email protected]
17+
with:
18+
service_account_key: ${{ secrets.GCP_SA_KEY }}
19+
project_id: genuine-flight-317411
20+
export_default_credentials: true
21+
22+
# Configure Docker to use the gcloud command-line tool as a credential helper for authentication
23+
- name: Configure Docker
24+
run: |-
25+
gcloud auth configure-docker us-central1-docker.pkg.dev
26+
27+
- name: Verify gcloud configuration
28+
run: |-
29+
gcloud config get-value project
30+
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v1
33+
34+
- name: Build and push Docker images
35+
uses: docker/build-push-action@v2
36+
with:
37+
file: dockerfile
38+
context: .
39+
platforms: linux/arm64,linux/amd64
40+
push: true
41+
tags: us-central1-docker.pkg.dev/genuine-flight-317411/devel/java-toolkit:${{ github.ref_name }}
42+
43+
- name: Login to Docker Hub
44+
uses: docker/login-action@v1
45+
with:
46+
username: ${{ secrets.DOCKER_USERNAME }}
47+
password: ${{ secrets.DOCKER_PASSWORD }}
48+
49+
- name: Build and push Docker images Dockerhub
50+
uses: docker/build-push-action@v2
51+
with:
52+
file: dockerfile
53+
context: .
54+
platforms: linux/arm64,linux/amd64
55+
push: true
56+
tags: robustadev/java-toolkit:${{ github.ref_name }}

build_release.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ docker buildx build \
22
--build-arg BUILDKIT_INLINE_CACHE=1 \
33
--platform linux/arm64,linux/amd64 \
44
--tag robustadev/java-toolkit:${TAG} \
5-
--tag us-central1-docker.pkg.dev/genuine-flight-317411/devel/java-toolkit-11:${TAG} \
5+
--tag us-central1-docker.pkg.dev/genuine-flight-317411/devel/java-toolkit:${TAG} \
66
--push \
77
.

0 commit comments

Comments
 (0)