Skip to content

Commit

Permalink
Docker GitHub Workflow (#4)
Browse files Browse the repository at this point in the history
add GitHub workflow for building docker image
  • Loading branch information
just-max authored Sep 8, 2023
1 parent e1a1dec commit d678050
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build and deploy Docker image

on:
push:
release:
types:
- published

jobs:
build-deploy-docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout tree
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: "\
ghcr.io/${{ github.repository }}:${{ github.sha }},\
ghcr.io/${{ github.repository }}:\
${{ github.head_ref || github.ref_name }}"

0 comments on commit d678050

Please sign in to comment.