moving stats out of store; changing to use where appropriate #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create and publish Docker image | |
on: | |
push: | |
branches: ["main"] | |
tags: ["v*.*.*"] | |
release: | |
types: ["prereleased"] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build-and-push-image: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=semver,pattern={{version}} | |
type=ref,event=branch | |
labels: | | |
org.opencontainers.image.title=Yacht | |
org.opencontainers.image.url=https://github.com/SelfhostedPro/yacht-nuxt/pkgs/container/yacht-nuxt | |
org.opencontainers.image.description=A web interface for managing docker containers with an emphasis on making selfhosting easy | |
org.opencontainers.image.documentation=https://yacht.sh/docs/ | |
org.opencontainers.image.licenses=MIT | |
org.opencontainers.image.base.name=ghcr.io/selfhostedpro/yacht-nuxt:main | |
org.opencontainers.image.vendor=SelfhostedPro | |
sh.yacht.icon=https://raw.githubusercontent.com/SelfhostedPro/yacht-nuxt/main/assets/icons/yacht/mini.svg | |
sh.yacht.self=true | |
sh.yacht.ports.3000=WebUI | |
sh.yacht.shell=/bin/sh | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
push: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |