From b3713136d1fccacd55dbcd507739f2b788b29554 Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Tue, 17 Jan 2023 10:39:01 +0900 Subject: [PATCH] CI: test release.yml on every PR Signed-off-by: Akihiro Suda (cherry picked from commit ffabc8a296691418d07f042d489987b67d0ddde1) Signed-off-by: Austin Vazquez --- .github/workflows/release.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e55605e7bbd1..2d04ace7f3bb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,14 @@ on: push: + branches: + - main + - "release/**" tags: - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 + pull_request: + branches: + - main + - "release/**" name: Containerd Release @@ -14,6 +21,7 @@ permissions: # added using https://github.com/step-security/secure-workflows jobs: check: name: Check Signed Tag + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-20.04 timeout-minutes: 5 outputs: @@ -57,7 +65,6 @@ jobs: build: name: Build Release Binaries runs-on: ubuntu-20.04 - needs: [check] timeout-minutes: 30 strategy: matrix: @@ -87,10 +94,9 @@ jobs: - uses: ./src/github.com/containerd/containerd/.github/actions/install-go - - name: Set env + - name: Set RELEASE_VER + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') shell: bash - env: - MOS: ubuntu-20.04 run: | releasever=${{ github.ref }} releasever="${releasever#refs/tags/}" @@ -129,6 +135,7 @@ jobs: release: name: Create containerd Release + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') permissions: contents: write runs-on: ubuntu-20.04