Skip to content

Commit

Permalink
prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
cthtrifork committed Jan 24, 2024
1 parent b510aa1 commit f36b28b
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Create and publish Cheetah.WebApi Docker image

on:
workflow_dispatch:

push:
branches: ["main"]
tags:
- "v*"
pull_request:
branches: ["main"]

env:
IMAGE_NAME: trifork/cheetah-example-webapi # image name, must have gh org prefix
PROJECT_PATH: Cheetah.WebApi/Cheetah.WebApi.csproj # path to csproj, relative to ./src (i know..)
DOCKERFILE_PATH: src/Cheetah.WebApi/Dockerfile

jobs:
build-and-push-image:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: "Build and push"
uses: trifork/cheetah-infrastructure-utils-workflows/.github/actions/build-image/dotnet@main
with:
read_package_pat: ${{ secrets.PACKAGE_PAT }} # we need this, as GITHUB_TOKEN only have permission to its own repo
image_name: ${{ env.IMAGE_NAME }}
project_path: ${{ env.PROJECT_PATH }}
context: .
assembly_name: NA
github_run_id: ${{ github.run_id }}
dockerfile_path: ${{ env.DOCKERFILE_PATH }}
push_image: ${{ (github.ref_type == 'tag' || github.event_name == 'workflow_dispatch') && 'true' || 'false' }}

0 comments on commit f36b28b

Please sign in to comment.