Skip to content

Build sfp Docker Image (Review) #45

Build sfp Docker Image (Review)

Build sfp Docker Image (Review) #45

name: Build sfp Docker Image (Review)
on:
push:
branches:
- main
workflow_dispatch:
inputs:
commit_id:
description: 'Commit ID to build and publish'
required: true
jobs:
build-and-publish-docker:
runs-on: ubuntu-latest
environment: dev
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.commit_id }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
ghcr.io/flxbl-io/sfp-rc:review
build-args: |
GIT_COMMIT==${{ github.event.inputs.commit_id }}
SF_COMMIT_ID=${{ github.event.inputs.commit_id }}