From 64bf5f423cead187767d5d31579aa477a1b650aa Mon Sep 17 00:00:00 2001 From: The Oh Brothers Bot Date: Sun, 25 Feb 2024 13:12:39 +0000 Subject: [PATCH] Refactor: Update CI files Signed-off-by: The Oh Brothers Bot --- .github/release-drafter.yml | 4 ++ .github/workflows/ci-master-pr.yml | 68 +++++++++---------- generate/definitions/FILES.ps1 | 1 - .../templates/.github/release-drafter.yml.ps1 | 52 -------------- .../.github/workflows/ci-master-pr.yml.ps1 | 14 ++-- 5 files changed, 46 insertions(+), 93 deletions(-) delete mode 100644 generate/templates/.github/release-drafter.yml.ps1 diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 80c8b7b..1c833d6 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -4,7 +4,11 @@ categories: - title: '🚀 Features' labels: - 'feature' + - title: '✨ Enhancements' + labels: - 'enhancement' + - title: '🎚 Change' + labels: - 'change' - title: '🐛 Bug Fixes' labels: diff --git a/.github/workflows/ci-master-pr.yml b/.github/workflows/ci-master-pr.yml index 39918d4..efb2772 100644 --- a/.github/workflows/ci-master-pr.yml +++ b/.github/workflows/ci-master-pr.yml @@ -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: | @@ -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.8.1-${{ github.sha }} @@ -105,7 +105,7 @@ jobs: - name: 2.8.1 - 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.8.1 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -119,7 +119,7 @@ jobs: - name: 2.8.1 - 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.8.1 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -132,7 +132,7 @@ jobs: - name: 2.8.1 - 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.8.1 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -173,7 +173,7 @@ jobs: - name: 2.8.1-libvirt-8 - 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.8.1-libvirt-8 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -187,7 +187,7 @@ jobs: - name: 2.8.1-libvirt-8 - 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.8.1-libvirt-8 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -200,7 +200,7 @@ jobs: - name: 2.8.1-libvirt-8 - 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.8.1-libvirt-8 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -240,7 +240,7 @@ jobs: - name: 2.8.1-curl-git-jq-sops-ssh - 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.8.1-curl-git-jq-sops-ssh platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -254,7 +254,7 @@ jobs: - name: 2.8.1-curl-git-jq-sops-ssh - 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.8.1-curl-git-jq-sops-ssh platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -267,7 +267,7 @@ jobs: - name: 2.8.1-curl-git-jq-sops-ssh - 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.8.1-curl-git-jq-sops-ssh platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -307,7 +307,7 @@ jobs: - name: 2.8.1-libvirt-7 - 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.8.1-libvirt-7 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -321,7 +321,7 @@ jobs: - name: 2.8.1-libvirt-7 - 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.8.1-libvirt-7 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -334,7 +334,7 @@ jobs: - name: 2.8.1-libvirt-7 - 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.8.1-libvirt-7 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -374,7 +374,7 @@ jobs: - name: 2.8.1-libvirt-6 - 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.8.1-libvirt-6 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -388,7 +388,7 @@ jobs: - name: 2.8.1-libvirt-6 - 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.8.1-libvirt-6 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -401,7 +401,7 @@ jobs: - name: 2.8.1-libvirt-6 - 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.8.1-libvirt-6 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -425,7 +425,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Display system info (linux) run: | @@ -449,7 +449,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.7.0-${{ github.sha }} @@ -493,7 +493,7 @@ jobs: - name: 2.7.0 - 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.7.0 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -507,7 +507,7 @@ jobs: - name: 2.7.0 - 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.7.0 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -520,7 +520,7 @@ jobs: - name: 2.7.0 - 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.7.0 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -560,7 +560,7 @@ jobs: - name: 2.7.0-libvirt-8 - 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.7.0-libvirt-8 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -574,7 +574,7 @@ jobs: - name: 2.7.0-libvirt-8 - 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.7.0-libvirt-8 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -587,7 +587,7 @@ jobs: - name: 2.7.0-libvirt-8 - 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.7.0-libvirt-8 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -627,7 +627,7 @@ jobs: - name: 2.7.0-curl-git-jq-sops-ssh - 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.7.0-curl-git-jq-sops-ssh platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -641,7 +641,7 @@ jobs: - name: 2.7.0-curl-git-jq-sops-ssh - 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.7.0-curl-git-jq-sops-ssh platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -654,7 +654,7 @@ jobs: - name: 2.7.0-curl-git-jq-sops-ssh - 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.7.0-curl-git-jq-sops-ssh platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -694,7 +694,7 @@ jobs: - name: 2.7.0-libvirt-7 - 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.7.0-libvirt-7 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -708,7 +708,7 @@ jobs: - name: 2.7.0-libvirt-7 - 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.7.0-libvirt-7 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -721,7 +721,7 @@ jobs: - name: 2.7.0-libvirt-7 - 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.7.0-libvirt-7 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -761,7 +761,7 @@ jobs: - name: 2.7.0-libvirt-6 - 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.7.0-libvirt-6 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -775,7 +775,7 @@ jobs: - name: 2.7.0-libvirt-6 - 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.7.0-libvirt-6 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -788,7 +788,7 @@ jobs: - name: 2.7.0-libvirt-6 - 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.7.0-libvirt-6 platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 diff --git a/generate/definitions/FILES.ps1 b/generate/definitions/FILES.ps1 index f64d3bc..42c0f57 100644 --- a/generate/definitions/FILES.ps1 +++ b/generate/definitions/FILES.ps1 @@ -1,6 +1,5 @@ # Files' definition $FILES = @( '.github/workflows/ci-master-pr.yml' - '.github/release-drafter.yml' 'README.md' ) diff --git a/generate/templates/.github/release-drafter.yml.ps1 b/generate/templates/.github/release-drafter.yml.ps1 deleted file mode 100644 index 9cb863e..0000000 --- a/generate/templates/.github/release-drafter.yml.ps1 +++ /dev/null @@ -1,52 +0,0 @@ -@' -name-template: 'v$RESOLVED_VERSION 🌈' -tag-template: 'v$RESOLVED_VERSION' -categories: - - title: '🚀 Features' - labels: - - 'feature' - - 'enhancement' - - 'change' - - title: '🐛 Bug Fixes' - labels: - - 'fix' - - 'bug' - - title: '🖊️ Refactors' - labels: - - 'refactor' - - title: '👗 Style' - labels: - - 'style' - - title: '📝 Documentation' - labels: - - 'docs' - - 'documentation' - - title: '🧰 Maintenance' - label: 'chore' -change-template: '- $TITLE @$AUTHOR (#$NUMBER)' -version-resolver: - major: - labels: - - 'breaking' - minor: - labels: - - 'feature' - - 'enhancement' - - 'change' - - 'refactor' - patch: - labels: - - 'fix' - - 'bug' - - 'style' - - 'docs' - - 'documentation' - - 'chore' - default: patch -sort-by: title -template: | - ## Changes - - $CHANGES - -'@ diff --git a/generate/templates/.github/workflows/ci-master-pr.yml.ps1 b/generate/templates/.github/workflows/ci-master-pr.yml.ps1 index 9be7359..d65c283 100644 --- a/generate/templates/.github/workflows/ci-master-pr.yml.ps1 +++ b/generate/templates/.github/workflows/ci-master-pr.yml.ps1 @@ -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) { @" @@ -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: | @@ -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 }} @@ -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 ',' ) @@ -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 ',' ) @@ -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 ',' )