Skip to content

Commit

Permalink
Add docker build, push workflow.
Browse files Browse the repository at this point in the history
Add docker build, push workflow.
  • Loading branch information
tschaefer committed Dec 18, 2023
1 parent 99e4843 commit 6e694b1
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: docker-release
on:
push:
branches:
- 'main'
- 'develop'
tags:
- 'v*.*.*'

jobs:
build:
name: Buid and push Docker image to GitHub Container registry
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout the repository
uses: actions/checkout@v3

- name: Docker Setup Buildx
uses: docker/[email protected]

- name: Docker Login
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker images
uses: docker/[email protected]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
with:
context: .
file: ./Dockerfile
target: final
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:develop
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM docker.io/bitnami/minideb:latest
LABEL org.opencontainers.image.source="https://github.com/tschaefer/beets-store"

RUN install_packages nginx pipx redis-server curl
COPY rootfs /
Expand Down

0 comments on commit 6e694b1

Please sign in to comment.