Skip to content

Test Docker image build #2

Test Docker image build

Test Docker image build #2

Workflow file for this run

name: build-docker-image
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
paths:
- "Dockerfile"
jobs:
build-and-push-docker-image:
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v4
with:
sparse-checkout: |
Dockerfile
sparse-checkout-cone-mode: false
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/${{ github.repository }}/build-image:latest