From 4f14d99ba4b0b55a10557666e68075087db19c0a Mon Sep 17 00:00:00 2001 From: Javier Marcos <1271349+javuto@users.noreply.github.com> Date: Tue, 13 Feb 2024 13:03:40 +0100 Subject: [PATCH 1/2] Updates to actions and remove path for upload-artifacts --- .github/actions/build/binaries/action.yml | 9 ++++----- .github/actions/build/docker/action.yml | 4 ++-- .github/actions/build/dpkg/action.yml | 10 +++++----- .../actions/tagged_release/docker/codesign/action.yml | 2 +- .github/actions/tagged_release/github/action.yml | 4 ++-- .github/actions/test/binaries/action.yml | 6 +++--- .github/workflows/build_and_test_main_merge.yml | 6 +++--- .github/workflows/build_and_test_pr.yml | 2 +- .github/workflows/create_tagged_releases.yml | 8 ++++---- 9 files changed, 25 insertions(+), 26 deletions(-) diff --git a/.github/actions/build/binaries/action.yml b/.github/actions/build/binaries/action.yml index 1b4e156d..8ebb7987 100644 --- a/.github/actions/build/binaries/action.yml +++ b/.github/actions/build/binaries/action.yml @@ -28,14 +28,14 @@ runs: steps: ########################### Checkout code ########################### - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 2 ########################### Install go to env ########################### - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5.0.0 with: go-version: ${{ inputs.golang_version }} - run: go version @@ -49,7 +49,7 @@ runs: ########################### Build osctrl inputs.osctrl_component ########################### - - name: Build osctrl-tls + - name: Build osctrl component run: | GOOS=${{ inputs.go_os }} GOARCH=${{ inputs.go_arch }} \ go build -o osctrl-${{ inputs.osctrl_component }}-${{ inputs.commit_sha }}-${{ inputs.go_os }}-${{ inputs.go_arch }}.bin \ @@ -59,8 +59,7 @@ runs: ########################### Upload artifacts ########################### - name: Upload osctrl binaries - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4.3.1 with: name: osctrl-${{ inputs.osctrl_component }}-${{ inputs.commit_sha }}-${{ inputs.go_os }}-${{ inputs.go_arch }}.bin - path: osctrl-${{ inputs.osctrl_component }}-${{ inputs.go_os }}-${{ inputs.go_arch }}.bin retention-days: 10 diff --git a/.github/actions/build/docker/action.yml b/.github/actions/build/docker/action.yml index 5117586a..cf6d3c2e 100644 --- a/.github/actions/build/docker/action.yml +++ b/.github/actions/build/docker/action.yml @@ -37,13 +37,13 @@ runs: steps: ########################### Checkout code ########################### - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 2 ########################### Download osctrl binary ########################### - name: Download a osctrl binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.2 with: name: osctrl-${{ inputs.osctrl_component }}-${{ inputs.commit_sha }}-${{ inputs.go_os }}-${{ inputs.go_arch }}.bin diff --git a/.github/actions/build/dpkg/action.yml b/.github/actions/build/dpkg/action.yml index c7e15001..4673c1f6 100644 --- a/.github/actions/build/dpkg/action.yml +++ b/.github/actions/build/dpkg/action.yml @@ -25,13 +25,13 @@ runs: steps: ########################### Checkout code ########################### - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 2 ########################### Download osctrl binary ########################### - name: Download a osctrl binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.2 with: name: osctrl-${{ inputs.osctrl_component }}-${{ inputs.commit_sha }}-${{ inputs.go_os }}-${{ inputs.go_arch }}.bin @@ -48,7 +48,7 @@ runs: OSCTRL_VERSION: ${{ inputs.commit_sha }} - name: Create DEB package contents - uses: jiro4989/build-deb-action@v2 + uses: jiro4989/build-deb-action@v3.0.0 if: startsWith(github.ref, 'refs/tags/') with: package: osctrl-${{ inputs.osctrl_component }} @@ -59,7 +59,7 @@ runs: desc: "DEB package for osctrl-${OSCTRL_COMPONENT}-${OSCTRL_VERSION} Commit SHA: ${COMMIT_SHA}" - name: Create DEB package contents - uses: jiro4989/build-deb-action@v2 + uses: jiro4989/build-deb-action@v3.0.0 with: package: osctrl-${{ inputs.osctrl_component }} package_root: ".debpkg-osctrl-${{ inputs.osctrl_component }}-${{ inputs.commit_sha }}-${{ inputs.go_os }}-${{ inputs.go_arch }}" @@ -70,7 +70,7 @@ runs: ########################### Upload DEBs ########################### - name: Upload osctrl DEBs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4.3.1 with: name: osctrl-${{ inputs.osctrl_component }}_${{ inputs.release_version_tag }}-${{ inputs.commit_sha }}_${{ inputs.go_arch }}.deb path: osctrl-${{ inputs.osctrl_component }}_${{ inputs.release_version_tag }}-${{ inputs.commit_sha }}_${{ inputs.go_arch }}.deb diff --git a/.github/actions/tagged_release/docker/codesign/action.yml b/.github/actions/tagged_release/docker/codesign/action.yml index 987fbac5..4717bfce 100644 --- a/.github/actions/tagged_release/docker/codesign/action.yml +++ b/.github/actions/tagged_release/docker/codesign/action.yml @@ -34,7 +34,7 @@ runs: steps: ########################### Checkout code ########################### - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 2 diff --git a/.github/actions/tagged_release/github/action.yml b/.github/actions/tagged_release/github/action.yml index 794283a3..3934f6df 100644 --- a/.github/actions/tagged_release/github/action.yml +++ b/.github/actions/tagged_release/github/action.yml @@ -22,7 +22,7 @@ runs: steps: ########################### Download osctrl binary ########################### - name: Download osctrl binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.2 with: name: osctrl-${{ inputs.osctrl_component }}-${{ inputs.commit_sha }}-${{ inputs.go_os }}-${{ inputs.go_arch }}.bin @@ -53,7 +53,7 @@ runs: ########################### Download osctrl DEB package ########################### - name: Download osctrl binaries if: ${{ inputs.go_os }} == 'linux' - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.2 with: name: osctrl-${{ inputs.osctrl_component }}_${{ inputs.release_version_tag }}-${{ inputs.commit_sha }}_${{ inputs.go_arch }}.deb diff --git a/.github/actions/test/binaries/action.yml b/.github/actions/test/binaries/action.yml index e2a50639..6ecd5de9 100644 --- a/.github/actions/test/binaries/action.yml +++ b/.github/actions/test/binaries/action.yml @@ -27,7 +27,7 @@ runs: steps: ########################### Install go to env ########################### - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5.0.0 with: go-version: ${{ inputs.golang_version }} - run: go version @@ -35,7 +35,7 @@ runs: ########################### Checkout code ########################### - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.1 ########################### Lint golang code ########################### - name: golangci-lint @@ -50,7 +50,7 @@ runs: ########################### Download artifacts ########################### - name: Download a osctrl binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.2 with: name: osctrl-${{ inputs.osctrl_component }}-${{ inputs.commit_branch }}-${{ inputs.commit_sha }}-${{ inputs.go_os }}-${{ inputs.go_arch }}.bin diff --git a/.github/workflows/build_and_test_main_merge.yml b/.github/workflows/build_and_test_main_merge.yml index 3d409bb6..c8c47e55 100644 --- a/.github/workflows/build_and_test_main_merge.yml +++ b/.github/workflows/build_and_test_main_merge.yml @@ -20,7 +20,7 @@ jobs: steps: ########################### Checkout code ########################### - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 2 @@ -72,7 +72,7 @@ jobs: steps: ########################### Checkout code ########################### - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 2 @@ -107,7 +107,7 @@ jobs: steps: ########################### Checkout code ########################### - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 2 diff --git a/.github/workflows/build_and_test_pr.yml b/.github/workflows/build_and_test_pr.yml index 21c156a5..37396010 100644 --- a/.github/workflows/build_and_test_pr.yml +++ b/.github/workflows/build_and_test_pr.yml @@ -17,7 +17,7 @@ jobs: steps: ########################### Checkout code ########################### - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 2 diff --git a/.github/workflows/create_tagged_releases.yml b/.github/workflows/create_tagged_releases.yml index bdd3f3cb..53b1088b 100644 --- a/.github/workflows/create_tagged_releases.yml +++ b/.github/workflows/create_tagged_releases.yml @@ -21,7 +21,7 @@ jobs: steps: ########################### Checkout code ########################### - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 2 @@ -73,7 +73,7 @@ jobs: steps: ########################### Checkout code ########################### - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 2 @@ -108,7 +108,7 @@ jobs: steps: ########################### Checkout code ########################### - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 2 @@ -167,7 +167,7 @@ jobs: steps: ########################### Checkout code ########################### - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 2 From c4352bbd07c9b83d259f648c461efee3f61ad21b Mon Sep 17 00:00:00 2001 From: Javier Marcos <1271349+javuto@users.noreply.github.com> Date: Tue, 13 Feb 2024 16:03:34 +0100 Subject: [PATCH 2/2] Path parameter for action is required --- .github/actions/build/binaries/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/build/binaries/action.yml b/.github/actions/build/binaries/action.yml index 8ebb7987..b7fbecf6 100644 --- a/.github/actions/build/binaries/action.yml +++ b/.github/actions/build/binaries/action.yml @@ -62,4 +62,5 @@ runs: uses: actions/upload-artifact@v4.3.1 with: name: osctrl-${{ inputs.osctrl_component }}-${{ inputs.commit_sha }}-${{ inputs.go_os }}-${{ inputs.go_arch }}.bin + path: osctrl-${{ inputs.osctrl_component }}-${{ inputs.commit_sha }}-${{ inputs.go_os }}-${{ inputs.go_arch }}.bin retention-days: 10