Some checks failed
Build and Push Docker Image to GHCR / build-and-push (push) Failing after 8s
43 lines
943 B
YAML
43 lines
943 B
YAML
name: Build and Push Docker Image to GHCR
|
|
|
|
env:
|
|
OCI_REGISTRY: ghcr.io
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
tags: ["v*.*.*"]
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Log in to GHCR
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ OCI_REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Extract Docker metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ${{ OCI_REGISTRY }}/${{ github.repository }}
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|