Skip to content

Commit

Permalink
Added gh workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
santanusinha committed Apr 8, 2024
1 parent 3a01df4 commit c047a4d
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 3 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/release-on-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build and Push Container

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

# on:
# push:
# branches: [ "master" ]
# pull_request:
# branches: [ "master" ]

on: workflow_dispatch
# push:
# # Pattern matched against refs/tags
# tags:
# - '*' # Push events to every tag not containing /

jobs:

build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml


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

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: epoch-server
build-args: |
VERSION=${{ github.ref }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Zookeeper

## Usage

The Epoch server container is available at [quay.io](quay.io/santanu_sinha/epoch-server).
The Epoch server container is available at [ghcr.io](ghcr.io/phonepe/epoch-server).

The container is intended to be run on a Drove cluster.

Expand Down Expand Up @@ -116,7 +116,7 @@ The following is a sample app specification for deploying the epoch container on
"version": "1",
"executable": {
"type": "DOCKER",
"url": "quay.io/santanu_sinha/epoch-server:1.9",
"url": "ghcr.io/phonepe/epoch:latest",
"dockerPullTimeout": "2 minute"
},
"exposedPorts": [
Expand Down
2 changes: 1 addition & 1 deletion epoch-server/example/epoch-local.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1",
"executable": {
"type": "DOCKER",
"url": "quay.io/santanu_sinha/epoch-server:1.9",
"url": "ghcr.io/phonepe/epoch-server:latest",
"dockerPullTimeout": "2 minute"
},
"exposedPorts": [
Expand Down

0 comments on commit c047a4d

Please sign in to comment.