Skip to content

Commit

Permalink
feature: implement NCBO cron docker image build CI
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Jun 4, 2024
1 parent 5a6af32 commit e15e218
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
name: Docker Image CI
name: Docker branch Images build

on:
push:
branches:
- master
- development
- stage
- test
release:
types: [published]

types: [ published ]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
name: Push Docker branch image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
Expand All @@ -19,24 +24,33 @@ jobs:
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: bioportal/ncbo_cron
images: |
agroportal/ncbo_cron
ghcr.io/${{ github.repository }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
build-args: |
RUBY_VERSION=2.7
RUBY_VERSION=2.7.8
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
7 changes: 6 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ GEM
google-cloud-env (2.1.1)
faraday (>= 1.0, < 3.a)
google-cloud-errors (1.4.0)
google-protobuf (3.25.3-x86_64-darwin)
google-protobuf (3.25.3-x86_64-linux)
googleapis-common-protos (1.5.0)
google-protobuf (~> 3.18)
Expand All @@ -150,6 +151,9 @@ GEM
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
grpc (1.64.0-x86_64-darwin)
google-protobuf (~> 3.25)
googleapis-common-protos-types (~> 1.0)
grpc (1.64.0-x86_64-linux)
google-protobuf (~> 3.25)
googleapis-common-protos-types (~> 1.0)
Expand Down Expand Up @@ -278,6 +282,7 @@ GEM
macaddr (~> 1.0)

PLATFORMS
x86_64-darwin-23
x86_64-linux

DEPENDENCIES
Expand Down Expand Up @@ -311,4 +316,4 @@ DEPENDENCIES
test-unit-minitest

BUNDLED WITH
2.3.23
2.4.22

0 comments on commit e15e218

Please sign in to comment.