From 79ef0ac875bd94fdfffc1abaeba1f379632bfe62 Mon Sep 17 00:00:00 2001 From: mrekucci Date: Thu, 1 Aug 2024 21:24:10 +0200 Subject: [PATCH] fix: artifacts.yml action --- .github/workflows/artifacts.yml | 34 +++++++++------------------------ 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index 3503210b2..05ddda4fa 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -39,10 +39,6 @@ jobs: - name: Upload Artifact to AWS S3 run: | aws s3 cp ${{ env.ARTIFACT_NAME }} s3://${{ secrets.AWS_S3_BUCKET }} - - - name: Set Artifact Retention - if: ${{ !startsWith(github.ref, 'refs/tags/v') }} - run: | aws s3api put-object-tagging \ --bucket ${{ secrets.AWS_S3_BUCKET }} \ --key "${{ env.ARTIFACT_NAME }}" \ @@ -53,13 +49,10 @@ jobs: timeout-minutes: 30 strategy: matrix: - module: [ infrastructure/tools/keystore-generator, p2p/integrationtest/real-bidder, p2p/integrationtest/provider, bridge/standard/bridge-v1, external/geth, oracle, p2p] + module: [ infrastructure/tools/keystore-generator] +# module: [ infrastructure/tools/keystore-generator, p2p/integrationtest/real-bidder, p2p/integrationtest/provider, bridge/standard/bridge-v1, external/geth, oracle, p2p] steps: - - name: Set Snapshot Flag - if: ${{ !startsWith(github.ref, 'refs/tags/v') }} - run: echo "FLAGS=--snapshot" >> ${GITHUB_ENV} - - name: Checkout Code uses: actions/checkout@v4 with: @@ -86,7 +79,7 @@ jobs: uses: goreleaser/goreleaser-action@v5 with: version: latest - args: release --config=./${{ matrix.module }}/.goreleaser.yml --clean ${{ env.FLAGS }} + args: release --config=./${{ matrix.module }}/.goreleaser.yml --clean --snapshot env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -99,19 +92,10 @@ jobs: - name: Upload Artifacts to AWS S3 run: | - aws s3 cp ./dist/ s3://${{ secrets.AWS_S3_BUCKET }} \ - --recursive \ - --exclude "*" \ - --include "*.gz" \ - --include "*.txt" \ - - - name: Set Artifacts Retention - if: ${{ !startsWith(github.ref, 'refs/tags/v') }} - run: | - ls -1 ./dist | grep '\.gz\|\.txt$' | while read -r file; do - echo "Tagging uploaded file $file for auto delete" - aws s3api put-object-tagging \ + set -x + find /tmp/dist -type f \( -name "*.gz" -o -name "*.txt" \) \ + -exec aws s3 cp {} s3://${{ secrets.AWS_S3_BUCKET }}/ \; \ + -exec aws s3api put-object-tagging \ --bucket ${{ secrets.AWS_S3_BUCKET }} \ - --key "$file" \ - --tagging 'TagSet=[{Key=AutoDelete,Value=true}]' - done + --key {} \ + --tagging 'TagSet=[{Key=AutoDelete,Value=true}]' \;