Skip to content

Build Docker Image And Push #9

Build Docker Image And Push

Build Docker Image And Push #9

Workflow file for this run

name: "Build Docker Image And Push"
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: 'Tag'
required: true
default: 'latest'
jobs:
# build-and-push-docker-image:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: docker/setup-qemu-action@v3
# name: "Set up QEMU"
# - uses: docker/setup-buildx-action@v3
# name: "Set up Docker Buildx"
# - uses: docker/login-action@v3
# name: "Login to Docker Hub"
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# registry: ghcr.io
# - uses: docker/build-push-action@v5
# name: "Build and push"
# with:
# push: true
# tags: ghcr.io/real-zony/ali-cloud-dynamic-dns:${{ github.event.release.name }}
# file: ./AliCloudDynamicDNS/Dockerfile
# context: ./AliCloudDynamicDNS
# platforms: linux/amd64,linux/arm64
build-binary:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x
- name: "Restore dependencies"
run: dotnet restore
- name: "Build and publish"
run: ./scripts/build.sh
shell: bash
- name: "Upload artifact to release"
uses: ncipollo/release-action@v1
with:
artifacts: "./TempFiles/*.zip"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
artifactErrorsFailBuild: true
tag: ${{ github.event.release.name }}