Create a release #1
Workflow file for this run
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: Create a release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version to release' | |
required: true | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build: | |
if: ${{ github.actor != 'dependabot'}} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16.x | |
cache: "npm" | |
- run: npm install | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build Docker Image Locally | |
uses: docker/build-push-action@master | |
with: | |
context: . | |
file: ./Dockerfile | |
load: true | |
tags: | | |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main-enterprise | |
- name: Inspect the Docker Image | |
run: | | |
docker image inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main-enterprise | |
- name: Push Docker Image | |
if: ${{ success() }} | |
uses: docker/build-push-action@master | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: | | |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.version }} | |
platforms: linux/amd64,linux/arm64 | |
provenance: false | |
sbom: false |