Skip to content

Commit

Permalink
Update to RunnerSet, use concurrency control (#4222)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuru authored Dec 9, 2023
1 parent cbbe620 commit 27ddc48
Show file tree
Hide file tree
Showing 150 changed files with 1,848 additions and 1,903 deletions.
25 changes: 12 additions & 13 deletions .github/package-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#

name: "%PACKAGE_NAME%"
concurrency:
group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} (${{ inputs.package_version_override || 'LATEST' }}_r${{ inputs.release_number_override || '0' }})
cancel-in-progress: true
on:
push:
branches:
Expand Down Expand Up @@ -36,13 +39,13 @@ on:
required: false
type: string
release_number_override:
description: 'Zero-based release number of %PACKAGE_NAME% package to publish. Defaults to vendor/%PACKAGE_NAME%/RELEASE.'
description: 'Zero-based release number of %PACKAGE_NAME% package to publish. Defaults to 0 (zero) when version is specified, ignored if not.'
required: false
type: string

env:
%PACKAGE_NAME%_VERSION: ${{ github.event.inputs.package_version_override }}
%PACKAGE_NAME%_RELEASE: ${{ github.event.inputs.release_number_override }}
%PACKAGE_NAME%_VERSION: ${{ inputs.package_version_override }}
%PACKAGE_NAME%_RELEASE: ${{ inputs.release_number_override }}

jobs:
# Mergify cannot distinguish between 2 jobs with the same name run from different workflows,
Expand Down Expand Up @@ -101,7 +104,7 @@ jobs:
steps:
# Checkout the packages repo so we can build the packages as a monorepo
- name: "Checkout source code at current commit"
uses: actions/checkout@v3
uses: actions/checkout@v4

# Export the apk keys as files from secrets
- name: "Export keys"
Expand Down Expand Up @@ -173,16 +176,12 @@ jobs:
include:
# Default value for runs-on. Original matrix values will not be overridden, but added ones (like runs-on) can be.
# See https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
- runs-on:
- "self-hosted"
- "arm64"
- "packages"
# By including `arch: amd64` here, we override the `runs-on` value `arch` is `amd64`.
- runs-on: "self-hosted-arm64-large"
# By including `arch: amd64` here, we override the `runs-on` value when the matrix `arch` is `amd64`.
# This also forces the matrix to include `arch: amd64` even if it is not in the original matrix.
# This is why we do not default for amd64 and then override for arm64.
# This is why we do not default for amd64 and then override for arm64. (Because it would force arm64 to be included, and some tools are not available for arm64.)
- arch: amd64
runs-on:
- "ubuntu-latest"
runs-on: "ubuntu-latest"
runs-on: ${{ matrix.runs-on }}
env:
# We are in a bit of a bind here because of how GitHub actions work as of 2020-11-19
Expand All @@ -208,7 +207,7 @@ jobs:
steps:
# Checkout the packages repo so we can build the packages as a monorepo
- name: "Checkout source code at current commit"
uses: actions/checkout@v3
uses: actions/checkout@v4

# Build the packages for the matrix version
- name: "Build ${{matrix.package-type}} packages"
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/amazon-ecr-credential-helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#

name: "amazon-ecr-credential-helper"
concurrency:
group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} (${{ inputs.package_version_override || 'LATEST' }}_r${{ inputs.release_number_override || '0' }})
cancel-in-progress: true
on:
push:
branches:
Expand Down Expand Up @@ -36,13 +39,13 @@ on:
required: false
type: string
release_number_override:
description: 'Zero-based release number of amazon-ecr-credential-helper package to publish. Defaults to vendor/amazon-ecr-credential-helper/RELEASE.'
description: 'Zero-based release number of amazon-ecr-credential-helper package to publish. Defaults to 0 (zero) when version is specified, ignored if not.'
required: false
type: string

env:
amazon-ecr-credential-helper_VERSION: ${{ github.event.inputs.package_version_override }}
amazon-ecr-credential-helper_RELEASE: ${{ github.event.inputs.release_number_override }}
amazon-ecr-credential-helper_VERSION: ${{ inputs.package_version_override }}
amazon-ecr-credential-helper_RELEASE: ${{ inputs.release_number_override }}

jobs:
# Mergify cannot distinguish between 2 jobs with the same name run from different workflows,
Expand Down Expand Up @@ -101,7 +104,7 @@ jobs:
steps:
# Checkout the packages repo so we can build the packages as a monorepo
- name: "Checkout source code at current commit"
uses: actions/checkout@v3
uses: actions/checkout@v4

# Export the apk keys as files from secrets
- name: "Export keys"
Expand Down Expand Up @@ -173,16 +176,12 @@ jobs:
include:
# Default value for runs-on. Original matrix values will not be overridden, but added ones (like runs-on) can be.
# See https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
- runs-on:
- "self-hosted"
- "arm64"
- "packages"
# By including `arch: amd64` here, we override the `runs-on` value `arch` is `amd64`.
- runs-on: "self-hosted-arm64-large"
# By including `arch: amd64` here, we override the `runs-on` value when the matrix `arch` is `amd64`.
# This also forces the matrix to include `arch: amd64` even if it is not in the original matrix.
# This is why we do not default for amd64 and then override for arm64.
# This is why we do not default for amd64 and then override for arm64. (Because it would force arm64 to be included, and some tools are not available for arm64.)
- arch: amd64
runs-on:
- "ubuntu-latest"
runs-on: "ubuntu-latest"
runs-on: ${{ matrix.runs-on }}
env:
# We are in a bit of a bind here because of how GitHub actions work as of 2020-11-19
Expand All @@ -208,7 +207,7 @@ jobs:
steps:
# Checkout the packages repo so we can build the packages as a monorepo
- name: "Checkout source code at current commit"
uses: actions/checkout@v3
uses: actions/checkout@v4

# Build the packages for the matrix version
- name: "Build ${{matrix.package-type}} packages"
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/amtool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#

name: "amtool"
concurrency:
group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} (${{ inputs.package_version_override || 'LATEST' }}_r${{ inputs.release_number_override || '0' }})
cancel-in-progress: true
on:
push:
branches:
Expand Down Expand Up @@ -36,13 +39,13 @@ on:
required: false
type: string
release_number_override:
description: 'Zero-based release number of amtool package to publish. Defaults to vendor/amtool/RELEASE.'
description: 'Zero-based release number of amtool package to publish. Defaults to 0 (zero) when version is specified, ignored if not.'
required: false
type: string

env:
amtool_VERSION: ${{ github.event.inputs.package_version_override }}
amtool_RELEASE: ${{ github.event.inputs.release_number_override }}
amtool_VERSION: ${{ inputs.package_version_override }}
amtool_RELEASE: ${{ inputs.release_number_override }}

jobs:
# Mergify cannot distinguish between 2 jobs with the same name run from different workflows,
Expand Down Expand Up @@ -101,7 +104,7 @@ jobs:
steps:
# Checkout the packages repo so we can build the packages as a monorepo
- name: "Checkout source code at current commit"
uses: actions/checkout@v3
uses: actions/checkout@v4

# Export the apk keys as files from secrets
- name: "Export keys"
Expand Down Expand Up @@ -173,16 +176,12 @@ jobs:
include:
# Default value for runs-on. Original matrix values will not be overridden, but added ones (like runs-on) can be.
# See https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
- runs-on:
- "self-hosted"
- "arm64"
- "packages"
# By including `arch: amd64` here, we override the `runs-on` value `arch` is `amd64`.
- runs-on: "self-hosted-arm64-large"
# By including `arch: amd64` here, we override the `runs-on` value when the matrix `arch` is `amd64`.
# This also forces the matrix to include `arch: amd64` even if it is not in the original matrix.
# This is why we do not default for amd64 and then override for arm64.
# This is why we do not default for amd64 and then override for arm64. (Because it would force arm64 to be included, and some tools are not available for arm64.)
- arch: amd64
runs-on:
- "ubuntu-latest"
runs-on: "ubuntu-latest"
runs-on: ${{ matrix.runs-on }}
env:
# We are in a bit of a bind here because of how GitHub actions work as of 2020-11-19
Expand All @@ -208,7 +207,7 @@ jobs:
steps:
# Checkout the packages repo so we can build the packages as a monorepo
- name: "Checkout source code at current commit"
uses: actions/checkout@v3
uses: actions/checkout@v4

# Build the packages for the matrix version
- name: "Build ${{matrix.package-type}} packages"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/apkbuild.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: "apkbuild"
concurrency:
group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}
cancel-in-progress: true
on:
push:
branches:
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/argocd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#

name: "argocd"
concurrency:
group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} (${{ inputs.package_version_override || 'LATEST' }}_r${{ inputs.release_number_override || '0' }})
cancel-in-progress: true
on:
push:
branches:
Expand Down Expand Up @@ -36,13 +39,13 @@ on:
required: false
type: string
release_number_override:
description: 'Zero-based release number of argocd package to publish. Defaults to vendor/argocd/RELEASE.'
description: 'Zero-based release number of argocd package to publish. Defaults to 0 (zero) when version is specified, ignored if not.'
required: false
type: string

env:
argocd_VERSION: ${{ github.event.inputs.package_version_override }}
argocd_RELEASE: ${{ github.event.inputs.release_number_override }}
argocd_VERSION: ${{ inputs.package_version_override }}
argocd_RELEASE: ${{ inputs.release_number_override }}

jobs:
# Mergify cannot distinguish between 2 jobs with the same name run from different workflows,
Expand Down Expand Up @@ -101,7 +104,7 @@ jobs:
steps:
# Checkout the packages repo so we can build the packages as a monorepo
- name: "Checkout source code at current commit"
uses: actions/checkout@v3
uses: actions/checkout@v4

# Export the apk keys as files from secrets
- name: "Export keys"
Expand Down Expand Up @@ -173,16 +176,12 @@ jobs:
include:
# Default value for runs-on. Original matrix values will not be overridden, but added ones (like runs-on) can be.
# See https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
- runs-on:
- "self-hosted"
- "arm64"
- "packages"
# By including `arch: amd64` here, we override the `runs-on` value `arch` is `amd64`.
- runs-on: "self-hosted-arm64-large"
# By including `arch: amd64` here, we override the `runs-on` value when the matrix `arch` is `amd64`.
# This also forces the matrix to include `arch: amd64` even if it is not in the original matrix.
# This is why we do not default for amd64 and then override for arm64.
# This is why we do not default for amd64 and then override for arm64. (Because it would force arm64 to be included, and some tools are not available for arm64.)
- arch: amd64
runs-on:
- "ubuntu-latest"
runs-on: "ubuntu-latest"
runs-on: ${{ matrix.runs-on }}
env:
# We are in a bit of a bind here because of how GitHub actions work as of 2020-11-19
Expand All @@ -208,7 +207,7 @@ jobs:
steps:
# Checkout the packages repo so we can build the packages as a monorepo
- name: "Checkout source code at current commit"
uses: actions/checkout@v3
uses: actions/checkout@v4

# Build the packages for the matrix version
- name: "Build ${{matrix.package-type}} packages"
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/assume-role.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#

name: "assume-role"
concurrency:
group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} (${{ inputs.package_version_override || 'LATEST' }}_r${{ inputs.release_number_override || '0' }})
cancel-in-progress: true
on:
push:
branches:
Expand Down Expand Up @@ -36,13 +39,13 @@ on:
required: false
type: string
release_number_override:
description: 'Zero-based release number of assume-role package to publish. Defaults to vendor/assume-role/RELEASE.'
description: 'Zero-based release number of assume-role package to publish. Defaults to 0 (zero) when version is specified, ignored if not.'
required: false
type: string

env:
assume-role_VERSION: ${{ github.event.inputs.package_version_override }}
assume-role_RELEASE: ${{ github.event.inputs.release_number_override }}
assume-role_VERSION: ${{ inputs.package_version_override }}
assume-role_RELEASE: ${{ inputs.release_number_override }}

jobs:
# Mergify cannot distinguish between 2 jobs with the same name run from different workflows,
Expand Down Expand Up @@ -101,7 +104,7 @@ jobs:
steps:
# Checkout the packages repo so we can build the packages as a monorepo
- name: "Checkout source code at current commit"
uses: actions/checkout@v3
uses: actions/checkout@v4

# Export the apk keys as files from secrets
- name: "Export keys"
Expand Down Expand Up @@ -173,16 +176,12 @@ jobs:
include:
# Default value for runs-on. Original matrix values will not be overridden, but added ones (like runs-on) can be.
# See https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
- runs-on:
- "self-hosted"
- "arm64"
- "packages"
# By including `arch: amd64` here, we override the `runs-on` value `arch` is `amd64`.
- runs-on: "self-hosted-arm64-large"
# By including `arch: amd64` here, we override the `runs-on` value when the matrix `arch` is `amd64`.
# This also forces the matrix to include `arch: amd64` even if it is not in the original matrix.
# This is why we do not default for amd64 and then override for arm64.
# This is why we do not default for amd64 and then override for arm64. (Because it would force arm64 to be included, and some tools are not available for arm64.)
- arch: amd64
runs-on:
- "ubuntu-latest"
runs-on: "ubuntu-latest"
runs-on: ${{ matrix.runs-on }}
env:
# We are in a bit of a bind here because of how GitHub actions work as of 2020-11-19
Expand All @@ -208,7 +207,7 @@ jobs:
steps:
# Checkout the packages repo so we can build the packages as a monorepo
- name: "Checkout source code at current commit"
uses: actions/checkout@v3
uses: actions/checkout@v4

# Build the packages for the matrix version
- name: "Build ${{matrix.package-type}} packages"
Expand Down
Loading

0 comments on commit 27ddc48

Please sign in to comment.