Skip to content

Commit 301f744

Browse files
authored
sync workflows, increase runner size (#7216)
* ci: sync workflows from release branch * ci: switch publish-release to larger runner
1 parent 6cb6fb5 commit 301f744

File tree

2 files changed

+14
-31
lines changed

2 files changed

+14
-31
lines changed

.github/workflows/main-ci.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ permissions:
88
contents: read
99

1010
concurrency:
11-
group: ${{ github.workflow }}-${{ github.ref }}
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
1212
cancel-in-progress: true
1313

1414
jobs:
@@ -26,13 +26,3 @@ jobs:
2626

2727
check-containers:
2828
uses: ./.github/workflows/check-containers.yml
29-
30-
publish-release:
31-
needs: [test, test-crds, test-dashboards, crosscompile, check-containers]
32-
uses: ./.github/workflows/publish-release.yml
33-
with:
34-
ref: ${{ github.ref_name }}
35-
is_release: false
36-
permissions:
37-
contents: write
38-
id-token: write

.github/workflows/publish-release.yml

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
name: Publish Release
22

33
on:
4-
workflow_call:
5-
inputs:
6-
ref:
7-
description: 'Git ref to build and publish'
8-
required: true
9-
type: string
10-
is_release:
11-
description: 'Whether this is a release build (affects artifact publishing)'
12-
required: false
13-
type: boolean
14-
default: false
4+
push:
5+
tags:
6+
- v*
7+
branches:
8+
- main
159

1610
permissions:
1711
contents: read
@@ -33,7 +27,6 @@ jobs:
3327
- name: Checkout code 🛎️
3428
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3529
with:
36-
ref: ${{ inputs.ref }}
3730
fetch-depth: 0
3831
persist-credentials: false
3932

@@ -45,6 +38,8 @@ jobs:
4538

4639
- name: Publish container 🚀
4740
run: ./tools/ci/docker-containers ${{ matrix.container }}
41+
env:
42+
DRONE_TAG: ${{ github.ref_name }}
4843

4944
publish-windows-containers:
5045
name: Publish Windows container (${{ matrix.container }})
@@ -62,20 +57,21 @@ jobs:
6257
- name: Checkout code 🛎️
6358
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6459
with:
65-
ref: ${{ inputs.ref }}
6660
fetch-depth: 0
6761
persist-credentials: false
6862

6963
- name: Build containers 🏗️
7064
run: |
7165
& "C:/Program Files/git/bin/bash.exe" ./tools/ci/docker-containers-windows ${{ matrix.container }}
7266
shell: powershell
67+
env:
68+
DRONE_TAG: ${{ github.ref_name }}
7369

7470
publish-release:
7571
name: Publish release
76-
runs-on: ubuntu-latest
72+
runs-on: ubuntu-latest-8-cores
7773
needs: [publish-linux-containers, publish-windows-containers]
78-
if: ${{ inputs.is_release }}
74+
if: startsWith(github.ref, 'refs/tags/v')
7975
permissions:
8076
contents: write
8177
id-token: write
@@ -86,7 +82,6 @@ jobs:
8682
- name: Checkout code 🛎️
8783
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8884
with:
89-
ref: ${{ inputs.ref }}
9085
fetch-depth: 0
9186
persist-credentials: false
9287

@@ -103,13 +98,11 @@ jobs:
10398
cache: false
10499

105100
- name: Build release artifacts 📦
106-
run: make -j4 RELEASE_BUILD=1 VERSION=${GITHUB_REF_NAME} dist
107-
env:
108-
GITHUB_REF_NAME: ${{ inputs.ref }}
101+
run: make -k -j4 RELEASE_BUILD=1 VERSION=${GITHUB_REF_NAME} dist
109102

110103
- name: Publish release 🚀
111104
run: |
112105
VERSION=${GITHUB_REF_NAME} RELEASE_DOC_TAG=$(echo ${GITHUB_REF_NAME} | awk -F '.' '{print $1"."$2}') ./tools/release
113106
env:
114107
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115-
GITHUB_REF_NAME: ${{ inputs.ref }}
108+
GITHUB_REF_NAME: ${{ github.ref_name }}

0 commit comments

Comments
 (0)