Update ci.yml

This commit is contained in:
meysamhadeli 2023-01-29 19:46:24 +03:30
parent b6ba725fd1
commit 04fc20d273
2 changed files with 6 additions and 31 deletions

View File

@ -9,7 +9,6 @@ on:
branches: [ "main" , "develop" ]
paths-ignore:
- "README.md"
workflow_dispatch:
jobs:
build:
@ -39,9 +38,12 @@ jobs:
- name: Test
run: dotnet test -c Release --no-restore
- name: Call Update Release Drafter
- name: Update Release Drafter
if: ${{ github.ref == 'refs/heads/main' && success() }}
uses: ./.github/workflows/reusable-release-drafter.yml
id: last_release
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
##ref: https://docs.docker.com/language/golang/configure-ci-cd/
##ref: https://event-driven.io/en/how_to_buid_and_push_docker_image_with_github_actions
@ -49,6 +51,7 @@ jobs:
uses: docker/login-action@v2
if: ${{ github.ref == 'refs/heads/main' && success() }}
with:
registry: _
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

View File

@ -1,28 +0,0 @@
name: Reusable Release Drafter
on:
push:
branches: [ "main" , "develop" ]
paths-ignore:
- "README.md"
pull_request:
branches: [ "main" , "develop" ]
paths-ignore:
- "README.md"
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update Release Drafter
if: ${{ github.ref == 'refs/heads/main'}}
id: last_release
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}