Skip to content

Publish Docker Image #3

Publish Docker Image

Publish Docker Image #3

Workflow file for this run

name: Publish Docker Image
on:
workflow_dispatch:
# push:
# branches:
# - master
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
if: ${{ github.actor != 'dependabot'}}
runs-on: ubuntu-latest
outputs:
release: ${{ steps.finalrelease.outputs.release }}
steps:
- uses: actions/checkout@v4
- 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 }}:master
- name: Inspect the Docker Image
run: |
docker image inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:master
- name: Push Docker Image
if: ${{ success() }}
uses: docker/build-push-action@master
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:master
platforms: linux/amd64,linux/arm64
provenance: false
sbom: false