Skip to content

Commit

Permalink
Merge pull request #8 from pushyamig/i6_docker_build
Browse files Browse the repository at this point in the history
adding github actions for docker build (iss. #6)
  • Loading branch information
lsloan authored Jun 18, 2024
2 parents 5aed955 + 15848b8 commit 63ac695
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/clrt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CLRT Build/Release

on:
push:
# takes muliple branch names
branches:
- main
- '[0-9][0-9][0-9][0-9].[0-9][0-9].*' # 2021.01.x
tags:
- '[0-9][0-9][0-9][0-9].[0-9][0-9].[0-9][0-9]' # 2021.01.01

workflow_dispatch:
inputs:
version:
description: 'Version'
required: true
default: 'YYYY.MINOR.MICRO'
env:
REPO_URL: ${{ github.repository }}

jobs:
build:
# to test a feature, change the repo name to your github id
if: github.repository_owner == 'tl-its-umich-edu'
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Extract branch name
id: extract_branch
run: echo "BRANCH_NAME=$(basename ${{ github.ref }})" >> $GITHUB_ENV

- name: build Docker image
run: |
docker build . --tag ghcr.io/${{ env.REPO_URL }}:${BRANCH_NAME}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push Docker image to GitHub Container Registry
run: |
docker push ghcr.io/${{ env.REPO_URL }}:${BRANCH_NAME}

0 comments on commit 63ac695

Please sign in to comment.