From bcf147905ae54d3b82d82398ee74b2856203db7a Mon Sep 17 00:00:00 2001 From: Romy <35330373+romayalon@users.noreply.github.com> Date: Wed, 22 May 2024 08:26:37 +0300 Subject: [PATCH] CI | RPM action | bump version and share files between re-usable workflows Signed-off-by: Romy <35330373+romayalon@users.noreply.github.com> --- .github/workflows/rpm-build-base.yaml | 4 +- .github/workflows/upload-rpm-to-aws.yaml | 49 ++++++++++++++---------- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/.github/workflows/rpm-build-base.yaml b/.github/workflows/rpm-build-base.yaml index 1dccbe6030..a75de404e4 100644 --- a/.github/workflows/rpm-build-base.yaml +++ b/.github/workflows/rpm-build-base.yaml @@ -79,7 +79,7 @@ jobs: echo "rpm_full_path=${RPM_FULL_PATH}" >> $GITHUB_OUTPUT - name: Upload artifact - uses: actions/upload-artifact@v1.0.0 + uses: actions/upload-artifact@v4 with: - name: noobaa_rpm + name: ${{ steps.finalize_full_rpm_path.outputs.rpm_full_path }} path: ${{ steps.finalize_full_rpm_path.outputs.rpm_full_path }} diff --git a/.github/workflows/upload-rpm-to-aws.yaml b/.github/workflows/upload-rpm-to-aws.yaml index a8a9615002..de87fffd6f 100644 --- a/.github/workflows/upload-rpm-to-aws.yaml +++ b/.github/workflows/upload-rpm-to-aws.yaml @@ -1,23 +1,30 @@ -name: Upload RPM to AWS -on: - workflow_call: - inputs: - rpm_full_path: - type: string - description: 'RPM path to be uploaded to AWS bucket' + name: Upload RPM to AWS + on: + workflow_call: + inputs: + rpm_full_path: + type: string + description: 'RPM path to be uploaded to AWS bucket' -jobs: - upload-rpm-to-aws: - runs-on: ubuntu-latest - timeout-minutes: 90 - steps: - - name: Setup AWS CLI - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.NEWAWSPROJKEY }} - aws-secret-access-key: ${{ secrets.NEWAWSPROJSECRET }} - aws-region: us-east-1 - - name: Copy RPM to S3 bucket - run: | - aws s3 cp ${{ inputs.rpm_full_path }} s3://noobaa-core-rpms/ + jobs: + upload-rpm-to-aws: + runs-on: ubuntu-latest + timeout-minutes: 90 + steps: + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: ${{ inputs.rpm_full_path }} + path: ${{ inputs.rpm_full_path }} + + - name: Setup AWS CLI + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.NEWAWSPROJKEY }} + aws-secret-access-key: ${{ secrets.NEWAWSPROJSECRET }} + aws-region: us-east-1 + + - name: Copy RPM to S3 bucket + run: | + aws s3 cp ${{ inputs.rpm_full_path }} s3://noobaa-core-rpms/