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

[MAIN-1748] added release action #7

Merged
merged 2 commits into from
Jul 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/release_images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Docker Build images on Tag

on:
release:
types: [published]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up gcloud CLI
uses: google-github-actions/[email protected]
with:
service_account_key: ${{ secrets.GCP_SA_KEY }}
project_id: genuine-flight-317411
export_default_credentials: true

# Configure Docker to use the gcloud command-line tool as a credential helper for authentication
- name: Configure Docker
run: |-
gcloud auth configure-docker us-central1-docker.pkg.dev

- name: Verify gcloud configuration
run: |-
gcloud config get-value project

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build and push Docker images
uses: docker/build-push-action@v2
with:
file: dockerfile
context: .
platforms: linux/arm64,linux/amd64
push: true
tags: us-central1-docker.pkg.dev/genuine-flight-317411/devel/java-toolkit:${{ github.ref_name }}

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker images Dockerhub
uses: docker/build-push-action@v2
with:
file: dockerfile
context: .
platforms: linux/arm64,linux/amd64
push: true
tags: robustadev/java-toolkit:${{ github.ref_name }}
2 changes: 1 addition & 1 deletion build_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ docker buildx build \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--platform linux/arm64,linux/amd64 \
--tag robustadev/java-toolkit:${TAG} \
--tag us-central1-docker.pkg.dev/genuine-flight-317411/devel/java-toolkit-11:${TAG} \
--tag us-central1-docker.pkg.dev/genuine-flight-317411/devel/java-toolkit:${TAG} \
--push \
.
2 changes: 1 addition & 1 deletion dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ENV PATH="/app/venv/bin:$PATH"
WORKDIR /app

RUN apt-get update \
&& apt-get install -y gcc \
&& apt-get install -y gcc procps \
&& dpkg --add-architecture arm64 \
&& apt-get purge -y --auto-remove \
&& rm -rf /var/lib/apt/lists/*
Expand Down
Loading