Delete Screen Shot 2023-12-12 at 9.44.44 AM.png #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build on push/release | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
release: | |
types: [published] | |
jobs: | |
build_studio: | |
name: Build studio | |
runs-on: ubuntu-20.04 | |
outputs: | |
image: ${{ steps.meta.outputs.json }} | |
permissions: | |
packages: write | |
id-token: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
ghcr.io/scaleoutsystems/power-consumption | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=sha | |
- name: Buildx driver | |
run: | | |
docker buildx create --use --driver=docker-container | |
- name: Log in to GitHub Docker Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: build and push studio | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./ | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |