Skip to content

Commit

Permalink
Refactor: Update CI files
Browse files Browse the repository at this point in the history
Signed-off-by: The Oh Brothers Bot <bot@theohbrothers.com>
  • Loading branch information
theohbrothersbot committed Mar 2, 2024
1 parent 3d7aeb6 commit e48d647
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 69 deletions.
4 changes: 4 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ categories:
- title: '🚀 Features'
labels:
- 'feature'
- title: '✨ Enhancements'
labels:
- 'enhancement'
- title: '🎚 Change'
labels:
- 'change'
- title: '🐛 Bug Fixes'
labels:
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/ci-master-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Display system info (linux)
run: |
Expand All @@ -61,7 +61,7 @@ jobs:
uses: docker/setup-buildx-action@v2

- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-2.90-${{ github.sha }}
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
- name: 2.90 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: variants/2.90
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
Expand All @@ -119,7 +119,7 @@ jobs:
- name: 2.90 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: variants/2.90
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
Expand All @@ -132,7 +132,7 @@ jobs:

- name: 2.90 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: variants/2.90
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
Expand All @@ -157,7 +157,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Display system info (linux)
run: |
Expand All @@ -181,7 +181,7 @@ jobs:
uses: docker/setup-buildx-action@v2

- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-2.86-${{ github.sha }}
Expand Down Expand Up @@ -225,7 +225,7 @@ jobs:
- name: 2.86 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: variants/2.86
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
Expand All @@ -239,7 +239,7 @@ jobs:
- name: 2.86 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: variants/2.86
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
Expand All @@ -252,7 +252,7 @@ jobs:

- name: 2.86 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: variants/2.86
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
Expand Down
1 change: 0 additions & 1 deletion generate/definitions/FILES.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Files' definition
$FILES = @(
'.github/workflows/ci-master-pr.yml'
'.github/release-drafter.yml'
'README.md'
)
52 changes: 0 additions & 52 deletions generate/templates/.github/release-drafter.yml.ps1

This file was deleted.

14 changes: 8 additions & 6 deletions generate/templates/.github/workflows/ci-master-pr.yml.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ jobs:
'@

# Group variants by the package version
$groups = $VARIANTS | Group-Object -Property { $_['_metadata']['job_group_key'] } | Sort-Object { [version]$_.Name.Split('-')[0] } -Descending
$groups = @(
$VARIANTS | Group-Object -Property { $_['_metadata']['job_group_key'] } | Sort-Object { [version]$_.Name.Split('-')[0] } -Descending
)
$WORKFLOW_JOB_NAMES = $groups | % { "build-$( $_.Name.Replace('.', '-') )" }
foreach ($g in $groups) {
@"
Expand All @@ -46,7 +48,7 @@ foreach ($g in $groups) {
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Display system info (linux)
run: |
Expand All @@ -70,7 +72,7 @@ foreach ($g in $groups) {
uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: `${{ runner.os }}-buildx-$( $g.Name )-`${{ github.sha }}
Expand Down Expand Up @@ -119,7 +121,7 @@ foreach ($v in $g.Group) {
- name: $( $v['tag' ] ) - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: $( $v['build_dir_rel'] )
platforms: $( $v['_metadata']['platforms'] -join ',' )
Expand All @@ -133,7 +135,7 @@ foreach ($v in $g.Group) {
- name: $( $v['tag' ] ) - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: $( $v['build_dir_rel'] )
platforms: $( $v['_metadata']['platforms'] -join ',' )
Expand All @@ -146,7 +148,7 @@ foreach ($v in $g.Group) {
- name: $( $v['tag' ] ) - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: $( $v['build_dir_rel'] )
platforms: $( $v['_metadata']['platforms'] -join ',' )
Expand Down

0 comments on commit e48d647

Please sign in to comment.