Skip to content

Commit

Permalink
Merge pull request #6 from NREL/actions_build
Browse files Browse the repository at this point in the history
Continuous Building of Image
  • Loading branch information
TShapinsky authored Mar 20, 2023
2 parents 85cc75d + de2761d commit 5be4bc9
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build for Development

on:
push:
branches:
- '*'
release:
types: [released]


env:
REGISTRY: ghcr.io

jobs:
build-image:
name: Build image
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Log into container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta
uses: docker/metadata-action@v4
id: meta
with:
images: |
${{ env.REGISTRY }}/${{ github.repository }}
tags: |
type=ref,event=branch
type=sha
type=semver,pattern={{version}},enable=${{ github.event_name == 'release' }}
type=semver,pattern={{major}},enable=${{ github.event_name == 'release' }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.output.labels }}

0 comments on commit 5be4bc9

Please sign in to comment.