updated github action for ghcr.io, alpine image variants
This commit is contained in:
parent
b468c44cd2
commit
5c62ee4077
22
.github/workflows/docker.yml
vendored
22
.github/workflows/docker.yml
vendored
|
@ -2,14 +2,14 @@ name: Docker Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags: [ v*, alpha-*, beta-* ]
|
tags: [ v* ]
|
||||||
|
|
||||||
env:
|
|
||||||
IMAGE_NAME: miawinter/wave
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
image_suffix: ["", "-alpine"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -19,11 +19,14 @@ jobs:
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.IMAGE_NAME }}
|
images: |
|
||||||
|
miawinter/wave
|
||||||
|
ghcr.io/${{ github.repository }}
|
||||||
tags: |
|
tags: |
|
||||||
type=semver,pattern={{version}}
|
type=semver,pattern={{version}}
|
||||||
flavor: |
|
flavor: |
|
||||||
latest=true
|
latest=true
|
||||||
|
suffix=${{ matrix.suffix }}, onlatest=true
|
||||||
labels: |
|
labels: |
|
||||||
maintainer=Mia Rose Winter
|
maintainer=Mia Rose Winter
|
||||||
org.opencontainers.image.title=Wave
|
org.opencontainers.image.title=Wave
|
||||||
|
@ -32,8 +35,14 @@ jobs:
|
||||||
org.opencontainers.image.description=The Collaborative Open Source Blogging Engine
|
org.opencontainers.image.description=The Collaborative Open Source Blogging Engine
|
||||||
org.opencontainers.image.vendor=Winter Software
|
org.opencontainers.image.vendor=Winter Software
|
||||||
org.opencontainers.image.licenses=MIT
|
org.opencontainers.image.licenses=MIT
|
||||||
|
|
||||||
- name: Log into the Container registry
|
- name: Log into the Container registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Log into Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
@ -52,3 +61,4 @@ jobs:
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
build-args: |
|
build-args: |
|
||||||
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
|
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
|
||||||
|
BASE=8.0${{ matrix.suffix }}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
ARG BASE=8.0
|
||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:$BASE AS base
|
||||||
RUN mkdir -p /app/files && chown app /app/files
|
RUN mkdir -p /app/files && chown app /app/files
|
||||||
RUN mkdir -p /configuration && chown app /configuration
|
RUN mkdir -p /configuration && chown app /configuration
|
||||||
RUN apt-get update && apt-get install -y curl
|
RUN apt-get update && apt-get install -y curl
|
||||||
|
|
Loading…
Reference in a new issue