Skip to content

Publish Docker image #1

Publish Docker image

Publish Docker image #1

Workflow file for this run

name: Docker image
on:
workflow_dispatch:
push:
branches:
- "dev"
- "main"
tags:
- "v*"
pull_request:
branches:
- "dev"
jobs:
docker:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: thecotne/gol2-indexer
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}