Skip to content

Update action.yml

Update action.yml #134

name: Docker_Release
on:
workflow_dispatch:
inputs:
push:
required: true
type: boolean
default: false
watch:
types: [started]
push:
branches: [action]
paths:
- 'ddtv/**'
- 'action.yml'
- '.github/workflows/Docker_Release.yml'
jobs:
release:
strategy:
matrix:
include:
- os: ubuntu-latest
runtime: linux-x64
- os: ubuntu-latest
runtime: linux-arm
- os: ubuntu-latest
runtime: linux-arm64
- os: ubuntu-latest
runtime: linux-musl-x64
- os: ubuntu-latest
runtime: linux-musl-arm
- os: ubuntu-latest
runtime: linux-musl-arm64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
ref: master
repository: CHKZL/DDTV
fetch-tags: true
fetch-depth: 0
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'
- id: build
run: |
version=$(git describe --tags)
git checkout --progress --force ${version}
cd Server
dotnet publish --runtime ${{ matrix.runtime }} --configuration Release --self-contained true --output build_output
echo "version=${version}" >> $GITHUB_OUTPUT
echo "path=${PWD}/build_output" >> $GITHUB_OUTPUT
- uses: moomiji/docker-ddtv@action
with:
push: true
repo: ddtv/server
path: ${{ steps.build.outputs.path }}
version: ${{ steps.build.outputs.version }}
runtime: ${{ matrix.runtime }}
os_id: ${{ contains(matrix.runtime, 'musl') && 'alpine' || 'debian' }}
dotnet-image-version: ${{ contains(matrix.runtime, 'musl') && '8.0-alpine' || '8.0' }}
outputs:
version: ${{ steps.build.outputs.version }}
merge:
runs-on: ubuntu-latest
needs:
- Release
steps:
- uses: moomiji/docker-ddtv@action
with:
push: true
repo: ddtv/server
os_id: alpine
version: ${{ needs.release.outputs.version }}
- uses: moomiji/docker-ddtv@action
with:
push: true
repo: ddtv/server
os_id: debian
version: ${{ needs.release.outputs.version }}