Skip to content

Commit

Permalink
Publish Docker image (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
thecotne authored Jan 14, 2024
1 parent 24c5095 commit 3b149a3
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Docker image

on:
workflow_dispatch:
push:
branches:
- "dev"
- "main"
- "docker"
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: ghcr.io/${{ github.repository }}

- 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
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 3b149a3

Please sign in to comment.