Skip to content

Commit

Permalink
Merge pull request #7 from theohbrothers/refactor/update-ci-files-202…
Browse files Browse the repository at this point in the history
…4-02-25

Refactor: Update CI files
  • Loading branch information
leojonathanoh committed Mar 2, 2024
2 parents 837711e + 597178d commit 0ef646f
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 132 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
30 changes: 15 additions & 15 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-1.25.3-${{ github.sha }}
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
- name: 1.25.3 - 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/1.25.3
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
Expand All @@ -119,7 +119,7 @@ jobs:
- name: 1.25.3 - 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/1.25.3
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
Expand All @@ -132,7 +132,7 @@ jobs:

- name: 1.25.3 - 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/1.25.3
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,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-1.24.0-${{ github.sha }}
Expand Down Expand Up @@ -225,7 +225,7 @@ jobs:
- name: 1.24.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/1.24.0
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
Expand All @@ -239,7 +239,7 @@ jobs:
- name: 1.24.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/1.24.0
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
Expand All @@ -252,7 +252,7 @@ jobs:

- name: 1.24.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/1.24.0
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
Expand All @@ -276,7 +276,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 @@ -300,7 +300,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-1.23.4-${{ github.sha }}
Expand Down Expand Up @@ -344,7 +344,7 @@ jobs:
- name: 1.23.4 - 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/1.23.4
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
Expand All @@ -358,7 +358,7 @@ jobs:
- name: 1.23.4 - 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/1.23.4
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
Expand All @@ -371,7 +371,7 @@ jobs:

- name: 1.23.4 - 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/1.23.4
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
Expand Down
5 changes: 2 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -179,15 +178,15 @@
APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2022 Takahiro INOUE <github.com/hinata>
Copyright 2019 The Oh Brothers

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
55 changes: 0 additions & 55 deletions Update-Versions.ps1

This file was deleted.

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 0ef646f

Please sign in to comment.