Skip to content

Disable metadata extraction in Docker workflow #3

Disable metadata extraction in Docker workflow

Disable metadata extraction in Docker workflow #3

Workflow file for this run

name: Publish to GitHub Container Registry
on:
push:
branches:
- 'discord-monies-2'
- 'master'
pull_request:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: haya14busa/action-cond@v1
id: checkpr
with:
cond: ${{ github.event_name == 'pull_request' }}
if_true: false
if_false: true
- name: Checkout repository
uses: actions/[email protected]
with:
submodules: 'recursive'
- name: Log in to the Container registry
uses: docker/login-action@master
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Extract metadata (tags, labels) for Docker
# id: meta
# uses: docker/metadata-action@master
# with:
# images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build .NET
run: |
dotnet build DiscordMonies/DiscordMonies.csproj -r linux-musl-x64 -c Release
- name: Publish .NET
if: ${{ github.event_name == 'push' }}
run: |
dotnet publish DiscordMonies/DiscordMonies.csproj -r linux-musl-x64 -t:PublishContainer -p:ContainerImageTag="${GITHUB_REF##*/}"