Skip to content

Commit

Permalink
chore: release docker image on ghcr.io, thanks to @kevinastone
Browse files Browse the repository at this point in the history
  • Loading branch information
TN1ck committed Apr 27, 2024
1 parent bd7e76a commit b0db1bf
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/container_image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build Container Image

# Controls when the workflow will run
on:
workflow_dispatch:
push:
branches: [master]
tags: [v*]
release:
types: [published]

permissions:
contents: read
packages: write

jobs:
build:
runs-on: ubuntu-latest
steps:
# Get the repository's code
- name: Checkout
uses: actions/checkout@v4

# Generate docker tags
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/tn1ck/super-sudoku

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
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 }}

1 comment on commit b0db1bf

@TN1ck
Copy link
Owner Author

@TN1ck TN1ck commented on b0db1bf Apr 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied from kevinastone@2c05558

Please sign in to comment.