Build Docker Image #31
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: Build Docker Image | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * 1" | |
push: | |
branches: | |
- main | |
paths: | |
- runtimes/dotnet/** | |
- .github/workflows/** | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
jobs: | |
push: | |
name: "dotnet:${{ matrix.tag }}" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
# This is used to complete the identity challenge | |
# with sigstore/fulcio when running outside of PRs. | |
id-token: write | |
strategy: | |
fail-fast: false | |
matrix: | |
tag: | |
- 5 | |
- 6 | |
- 7 | |
- 8 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
with: | |
buildkitd-flags: --debug | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/build-push-action@v5 | |
with: | |
context: runtimes/dotnet | |
file: runtimes/dotnet/${{ matrix.tag }}/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
ghcr.io/nexocrew-hq/moonlightdockerimages:dotnet${{ matrix.tag }} |