diff --git a/.github/workflows/code-check.yaml b/.github/workflows/code-check.yaml index 910310bf0c..f52b0ad4e7 100644 --- a/.github/workflows/code-check.yaml +++ b/.github/workflows/code-check.yaml @@ -1,9 +1,6 @@ name: Code Check on: - push: - branches: - - "main" pull_request: branches: - "main" diff --git a/.github/workflows/release-latest.yaml b/.github/workflows/release-latest.yaml index d64119627e..afe4cc1c16 100644 --- a/.github/workflows/release-latest.yaml +++ b/.github/workflows/release-latest.yaml @@ -9,6 +9,12 @@ permissions: contents: read packages: write +# Limit workflow run or job concurrency, +# avoid workflow failed when merge more than one PR in short time. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build-check: name: lint @@ -53,6 +59,11 @@ jobs: with: go-version: 1.22.x cache: true + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - run: make docker.push env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}