Skip to content

Commit

Permalink
fea:T Add github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
sirateek committed Feb 10, 2024
1 parent 00d36e4 commit a001212
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build Docker Image

on:
push:
tags:
- "*"

jobs:
build-docker-image:
runs-on: ubuntu-latest
steps:
# Fetch all repository details (Including tag for semver).
- uses: actions/checkout@v3

# Login to DockerHub by using the credentials.
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# Setup BuildX
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

# Build Docker Image and push to docker hub.
- name: Build and push Docker image
uses: docker/build-push-action@v5.1.0
with:
context: .
push: true
tags: ${{ format('ghcr.io/resource-aware-jds/resource-aware-jds:{0}', github.ref_name) }},ghcr.io/resource-aware-jds/resource-aware-jds:latest
github-token: ${{ secrets.GITHUB_TOKEN }}
platforms: |
linux/amd64
linux/arm64

0 comments on commit a001212

Please sign in to comment.