Skip to content

Commit

Permalink
add Github Actions to release CL2
Browse files Browse the repository at this point in the history
  • Loading branch information
alyssa1303 committed Oct 2, 2024
1 parent ba0ca7b commit 554cd8f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/clusterloader2-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and Push Docker Image for clusterloader2

on:
push:
paths:
- "clusterloader2/**"
tags:
- "v*"

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

steps:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Build and push image
run: |
cd clusterloader2
make build-image
make push-image
env:
IMAGE_REPO: ghcr.io/${{ github.repository_owner }}
IMAGE_TAG: ${{ github.ref_name }}
1 change: 1 addition & 0 deletions clusterloader2/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
DOCKERFILE = Dockerfile
IMAGE_REPO ?= localhost:5000
IMAGE_REPO := $(shell echo $(IMAGE_REPO) | tr '[:upper:]' '[:lower:]')
IMAGE_TAG ?= latest
IMAGE_NAME = $(IMAGE_REPO)/clusterloader2:$(IMAGE_TAG)

Expand Down

0 comments on commit 554cd8f

Please sign in to comment.