From 54246055a81988088b8d811ff7b82980acfa5f66 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Mon, 6 Feb 2023 14:44:32 +0000 Subject: [PATCH] Use our upload/download artifact actions Signed-off-by: Pedro Algarvio --- .github/workflows/build-deb-repo.yml | 3 ++- .github/workflows/build-macos-repo.yml | 3 ++- .github/workflows/build-onedir-repo.yml | 3 ++- .github/workflows/build-rpm-repo.yml | 3 ++- .github/workflows/build-windows-repo.yml | 3 ++- .github/workflows/publish-repositories.yml | 9 +++++++-- 6 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-deb-repo.yml b/.github/workflows/build-deb-repo.yml index 85e7d9796db..53792ec820a 100644 --- a/.github/workflows/build-deb-repo.yml +++ b/.github/workflows/build-deb-repo.yml @@ -132,9 +132,10 @@ jobs: --incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo - name: Upload Repository As An Artifact - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-artifact with: name: salt-${{ inputs.salt-version }}-${{ inputs.environment }}-repo path: artifacts/pkgs/repo/* retention-days: 7 if-no-files-found: error + archive-name: ${{ matrix.distro }}-${{ matrix.version }}-${{ matrix.arch }}-repo diff --git a/.github/workflows/build-macos-repo.yml b/.github/workflows/build-macos-repo.yml index 4149899ef2d..06d9fa4d912 100644 --- a/.github/workflows/build-macos-repo.yml +++ b/.github/workflows/build-macos-repo.yml @@ -95,9 +95,10 @@ jobs: --repo-path=artifacts/pkgs/repo - name: Upload Repository As An Artifact - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-artifact with: name: salt-${{ inputs.salt-version }}-${{ inputs.environment }}-repo path: artifacts/pkgs/repo/* retention-days: 7 if-no-files-found: error + archive-name: macos-repo diff --git a/.github/workflows/build-onedir-repo.yml b/.github/workflows/build-onedir-repo.yml index 94c69fe33f6..5a8d5beb23b 100644 --- a/.github/workflows/build-onedir-repo.yml +++ b/.github/workflows/build-onedir-repo.yml @@ -137,9 +137,10 @@ jobs: --repo-path=artifacts/pkgs/repo - name: Upload Repository As An Artifact - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-artifact with: name: salt-${{ inputs.salt-version }}-${{ inputs.environment }}-repo path: artifacts/pkgs/repo/* retention-days: 7 if-no-files-found: error + archive-name: onedir-repo diff --git a/.github/workflows/build-rpm-repo.yml b/.github/workflows/build-rpm-repo.yml index 965e47a5eb6..fae63211e0d 100644 --- a/.github/workflows/build-rpm-repo.yml +++ b/.github/workflows/build-rpm-repo.yml @@ -118,9 +118,10 @@ jobs: --incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo - name: Upload Repository As An Artifact - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-artifact with: name: salt-${{ inputs.salt-version }}-${{ inputs.environment }}-repo path: artifacts/pkgs/repo/* retention-days: 7 if-no-files-found: error + archive-name: ${{ matrix.distro }}-${{ matrix.version }}-${{ matrix.arch }}-repo diff --git a/.github/workflows/build-windows-repo.yml b/.github/workflows/build-windows-repo.yml index d0dc01a9ccf..a6cb6aa0fb9 100644 --- a/.github/workflows/build-windows-repo.yml +++ b/.github/workflows/build-windows-repo.yml @@ -101,9 +101,10 @@ jobs: --repo-path=artifacts/pkgs/repo - name: Upload Repository As An Artifact - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-artifact with: name: salt-${{ inputs.salt-version }}-${{ inputs.environment }}-repo path: artifacts/pkgs/repo/* retention-days: 7 if-no-files-found: error + archive-name: windows-repo diff --git a/.github/workflows/publish-repositories.yml b/.github/workflows/publish-repositories.yml index 2e8cea7d377..a443319b5e2 100644 --- a/.github/workflows/publish-repositories.yml +++ b/.github/workflows/publish-repositories.yml @@ -33,10 +33,15 @@ jobs: name: salt-${{ inputs.salt-version }}-${{ inputs.environment }}-repo path: repo/ + - name: Decompress Repository Artifacts + run: | + find repo/ -type f -name '*.tar.gz' -print -exec tar xvf {} \; + find repo/ -type f -name '*.tar.gz' -print -exec rm -f {} \; + - name: Show Repository run: | - tree -a repo/ + tree -a artifacts/pkgs/repo/ - name: Upload Repository Contents(${{ inputs.environment }}) run: | - aws s3 cp --acl bucket-owner-full-control --recursive repo/ s3://salt-project-prod-salt-artifacts-${{ inputs.environment }} + aws s3 cp --color on --acl bucket-owner-full-control --recursive artifacts/pkgs/repo/ s3://salt-project-prod-salt-artifacts-${{ inputs.environment }}