From 0c9e46c6d36b84a57973a089e958405bce1592e7 Mon Sep 17 00:00:00 2001 From: Scott Leggett Date: Tue, 1 Feb 2022 10:06:54 +0800 Subject: [PATCH] fix: retain file permissions in build artefacts --- .github/workflows/build.yaml | 17 +++++++++++------ .github/workflows/lint.yaml | 1 + .github/workflows/release.yaml | 15 +++++++++------ .github/workflows/tag-to-release.yaml | 15 +++++++++------ 4 files changed, 30 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 08e58556..2c084c74 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,11 +17,15 @@ jobs: with: version: latest args: build --snapshot --rm-dist - - name: Upload binaries + - name: Tar up binaries + # work around limitations in the upload/download artifact actions + # https://github.com/actions/download-artifact#limitations + run: tar -cvf dist.tar dist + - name: Upload binaries tar file uses: actions/upload-artifact@v2 with: - name: dist - path: dist + name: dist.tar + path: dist.tar buildimage: strategy: matrix: @@ -33,11 +37,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Download binaries + - name: Download binaries tar file uses: actions/download-artifact@v2 with: - name: dist - path: dist + name: dist.tar + - name: Untar binaries + run: tar -xvf dist.tar - name: Login to GHCR uses: docker/login-action@v1 with: diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index a792f98f..4ce3c637 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -11,6 +11,7 @@ jobs: uses: golangci/golangci-lint-action@v2.5.2 with: version: latest + args: --timeout=2m commitlint: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ac5cd685..4347a215 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -57,11 +57,13 @@ jobs: args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload binaries + - name: Tar up binaries + run: tar -cvf dist.tar dist + - name: Upload binaries tar file uses: actions/upload-artifact@v2 with: - name: dist - path: dist + name: dist.tar + path: dist.tar releaseimage: strategy: matrix: @@ -75,11 +77,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Download binaries + - name: Download binaries tar file uses: actions/download-artifact@v2 with: - name: dist - path: dist + name: dist.tar + - name: Untar binaries + run: tar -xvf dist.tar - name: Login to GHCR uses: docker/login-action@v1 with: diff --git a/.github/workflows/tag-to-release.yaml b/.github/workflows/tag-to-release.yaml index 05335b92..a8ab7920 100644 --- a/.github/workflows/tag-to-release.yaml +++ b/.github/workflows/tag-to-release.yaml @@ -22,11 +22,13 @@ jobs: args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload binaries + - name: Tar up binaries + run: tar -cvf dist.tar dist + - name: Upload binaries tar file uses: actions/upload-artifact@v2 with: - name: dist - path: dist + name: dist.tar + path: dist.tar releaseimage: strategy: matrix: @@ -40,11 +42,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Download binaries + - name: Download binaries tar file uses: actions/download-artifact@v2 with: - name: dist - path: dist + name: dist.tar + - name: Untar binaries + run: tar -xvf dist.tar - name: Login to GHCR uses: docker/login-action@v1 with: