Adapt GitHub Workflow for branch release-2.3 (#3461)

#### What type of PR is this?

/kind cleanup
/area core

#### What this PR does / why we need it:

For stable CI/CD in branch release-2.3.

#### Does this PR introduce a user-facing change?

```release-note
None
```
pull/3459/head^2
John Niang 2023-03-06 14:22:12 +08:00 committed by GitHub
parent 91626eaf2d
commit 0991fafb54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 6 deletions

View File

@ -3,15 +3,13 @@ name: Halo CI
on: on:
pull_request: pull_request:
branches: branches:
- main - release-2.3
- release-*
paths: paths:
- "**" - "**"
- "!**.md" - "!**.md"
push: push:
branches: branches:
- main - release-2.3
- release-*
paths: paths:
- "**" - "**"
- "!**.md" - "!**.md"
@ -56,11 +54,11 @@ jobs:
needs: test needs: test
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: halo-sigs/actions/halo-next-docker-build@main # change the version to specific ref or release tag while the action is stable. - uses: halo-sigs/actions/halo-next-docker-build@release-2.3 # change the version to specific ref or release tag while the action is stable.
with: with:
image-name: ${{ github.event_name == 'release' && 'halo' || 'halo-dev' }} image-name: ${{ github.event_name == 'release' && 'halo' || 'halo-dev' }}
ghcr-token: ${{ secrets.GHCR_TOKEN }} ghcr-token: ${{ secrets.GHCR_TOKEN }}
dockerhub-user: ${{ secrets.DOCKER_USERNAME }} dockerhub-user: ${{ secrets.DOCKER_USERNAME }}
dockerhub-token: ${{ secrets.DOCKER_TOKEN }} dockerhub-token: ${{ secrets.DOCKER_TOKEN }}
push: ${{ github.event_name == 'push' || github.event_name == 'release' }} # we only push to GHCR if the push is to the next branch push: ${{ github.event_name == 'push' || github.event_name == 'release' }} # we only push to GHCR if the push is to the next branch
console-ref: ${{ github.event_name == 'release' && github.ref || 'main' }} console-ref: ${{ github.event_name == 'release' && github.ref || 'release-2.3' }}