diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c22cf08..7edc4b8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,5 +36,18 @@ jobs: - name: Set artifact name as environment variable run: echo "ARTIFACT_NAME=$(echo '${{ steps.goreleaser.outputs.artifacts }}' | jq -r '.[] | select(.type == "Archive").name')" >> $GITHUB_ENV - - name: Use artifact name in next step - run: echo ${{env.ARTIFACT_NAME}} + - name: Modify file + run: | + # Use sed to replace the bucketKey value in the file with the ARTIFACT_NAME + sed -i "s/bucketKey:.*/bucketKey: lambda-processor-app\/artifacts\/${{ env.ARTIFACT_NAME }}/g" claim/sqs-lambda-s3-claim.yaml + + - name: Commit changes + run: | + git add claim/sqs-lambda-s3-claim.yaml + git commit -m "Update bucket key with ${ARTIFACT_NAME}" + + - name: Push changes + uses: ad-m/github-push-action@v0.6.0 + with: + branch: main #push directly to main for testing only + force: true