Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 30 additions & 3 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Docker Image
name: Build and Publish Docker Image

on:
workflow_call:
Expand All @@ -18,5 +18,32 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker image
run: docker build -f ./src/BuslyCLI.Console/Dockerfile -t busly-cli .

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: tragiccode
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: tragiccode/busly-cli

- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
file: ./src/BuslyCLI.Console/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v3
with:
subject-name: index.docker.io/tragiccode/busly-cli
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true