Githib Workflow Script Failing
-
I don't see an appropriate forum for this. I'll move it if there's one. I'm brand new to CI with Github, so forgive my ignorance. I'm trying to upload a file to AWS S3. Here's the script:
name: Deploy
on:
workflow_call:jobs:
deploy-development:
name: Deploy to S3 Releases directory (client_builds)
runs-on: ubuntu-latest
timeout-minutes: 20environment: name: Development url: steps: - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS\_ACCESS\_KEY\_ID }} aws-secret-access-key: ${{ secrets.AWS\_SECRET\_ACCESS\_KEY }} aws-region: eu-west-1 - name: Create Output Directory run: mkdir output - uses: actions/download-artifact@v3 with: name: MyUpload path: ${{ github.workspace }}/output/ - name: Rename output files run: | cd output for f in \*; do mv "$f" "${f%.\*}-${GITHUB\_REF/refs\\/tags\\//}.${f##\*.}"; done - name: Upload installer to s3 run: aws s3 cp output/\* s3://client-builds/releases/
The very last line:
run: aws s3 cp output/* s3://client-builds/releases
fails with "Unknown options: s3://client-builds/releases/". This script has not changed, so I'm not sure what's wrong. Can someone shed some light?
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
I don't see an appropriate forum for this. I'll move it if there's one. I'm brand new to CI with Github, so forgive my ignorance. I'm trying to upload a file to AWS S3. Here's the script:
name: Deploy
on:
workflow_call:jobs:
deploy-development:
name: Deploy to S3 Releases directory (client_builds)
runs-on: ubuntu-latest
timeout-minutes: 20environment: name: Development url: steps: - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS\_ACCESS\_KEY\_ID }} aws-secret-access-key: ${{ secrets.AWS\_SECRET\_ACCESS\_KEY }} aws-region: eu-west-1 - name: Create Output Directory run: mkdir output - uses: actions/download-artifact@v3 with: name: MyUpload path: ${{ github.workspace }}/output/ - name: Rename output files run: | cd output for f in \*; do mv "$f" "${f%.\*}-${GITHUB\_REF/refs\\/tags\\//}.${f##\*.}"; done - name: Upload installer to s3 run: aws s3 cp output/\* s3://client-builds/releases/
The very last line:
run: aws s3 cp output/* s3://client-builds/releases
fails with "Unknown options: s3://client-builds/releases/". This script has not changed, so I'm not sure what's wrong. Can someone shed some light?
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
Quick Answers[^] is probably the right place.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
I don't see an appropriate forum for this. I'll move it if there's one. I'm brand new to CI with Github, so forgive my ignorance. I'm trying to upload a file to AWS S3. Here's the script:
name: Deploy
on:
workflow_call:jobs:
deploy-development:
name: Deploy to S3 Releases directory (client_builds)
runs-on: ubuntu-latest
timeout-minutes: 20environment: name: Development url: steps: - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS\_ACCESS\_KEY\_ID }} aws-secret-access-key: ${{ secrets.AWS\_SECRET\_ACCESS\_KEY }} aws-region: eu-west-1 - name: Create Output Directory run: mkdir output - uses: actions/download-artifact@v3 with: name: MyUpload path: ${{ github.workspace }}/output/ - name: Rename output files run: | cd output for f in \*; do mv "$f" "${f%.\*}-${GITHUB\_REF/refs\\/tags\\//}.${f##\*.}"; done - name: Upload installer to s3 run: aws s3 cp output/\* s3://client-builds/releases/
The very last line:
run: aws s3 cp output/* s3://client-builds/releases
fails with "Unknown options: s3://client-builds/releases/". This script has not changed, so I'm not sure what's wrong. Can someone shed some light?
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
Why not use something that was already built for this purpose? S3 cp file · Actions · GitHub Marketplace · GitHub[^]
-
Why not use something that was already built for this purpose? S3 cp file · Actions · GitHub Marketplace · GitHub[^]
I don't understand. Isn't that was my script is using??
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
I don't see an appropriate forum for this. I'll move it if there's one. I'm brand new to CI with Github, so forgive my ignorance. I'm trying to upload a file to AWS S3. Here's the script:
name: Deploy
on:
workflow_call:jobs:
deploy-development:
name: Deploy to S3 Releases directory (client_builds)
runs-on: ubuntu-latest
timeout-minutes: 20environment: name: Development url: steps: - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS\_ACCESS\_KEY\_ID }} aws-secret-access-key: ${{ secrets.AWS\_SECRET\_ACCESS\_KEY }} aws-region: eu-west-1 - name: Create Output Directory run: mkdir output - uses: actions/download-artifact@v3 with: name: MyUpload path: ${{ github.workspace }}/output/ - name: Rename output files run: | cd output for f in \*; do mv "$f" "${f%.\*}-${GITHUB\_REF/refs\\/tags\\//}.${f##\*.}"; done - name: Upload installer to s3 run: aws s3 cp output/\* s3://client-builds/releases/
The very last line:
run: aws s3 cp output/* s3://client-builds/releases
fails with "Unknown options: s3://client-builds/releases/". This script has not changed, so I'm not sure what's wrong. Can someone shed some light?
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
This is part of an actual production powershell script that I use for recursively uploading documents from a local directory to S3 using AWS CLI in Powershell (of course). I refactored it to use your variable values.
$localdir = output
$bucketname = "s3://client-builds/releases/"& aws s3 cp $localdir $bucketname --recursive --profile YourProfileNameHere
-
This is part of an actual production powershell script that I use for recursively uploading documents from a local directory to S3 using AWS CLI in Powershell (of course). I refactored it to use your variable values.
$localdir = output
$bucketname = "s3://client-builds/releases/"& aws s3 cp $localdir $bucketname --recursive --profile YourProfileNameHere
Thanks. That looks like it's just doing the same thing. One thing I think I figured out is that this part
steps:
-
name: Create Output Directory
run: mkdir output2 -
uses: actions/download-artifact@v3
with:
name: Line2-Win-Next
path: ${{ github.workspace }}/output2/
doesn't seem to be creating the output folder. When I removed the wildcard asterick from the last line, the error message changed to
upload failed: output/ to s3://client-builds/releases/ [Errno 21] Is a directory: '/home/runner/work/Line2-Win-Next/Line2-Win-Next/output/'
Question: In this step
steps: - name: Create Output Directory run: mkdir output2
Running on linux. From this script, is it possible to see if that folder exists, and if so, its contents?
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
-
I don't see an appropriate forum for this. I'll move it if there's one. I'm brand new to CI with Github, so forgive my ignorance. I'm trying to upload a file to AWS S3. Here's the script:
name: Deploy
on:
workflow_call:jobs:
deploy-development:
name: Deploy to S3 Releases directory (client_builds)
runs-on: ubuntu-latest
timeout-minutes: 20environment: name: Development url: steps: - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS\_ACCESS\_KEY\_ID }} aws-secret-access-key: ${{ secrets.AWS\_SECRET\_ACCESS\_KEY }} aws-region: eu-west-1 - name: Create Output Directory run: mkdir output - uses: actions/download-artifact@v3 with: name: MyUpload path: ${{ github.workspace }}/output/ - name: Rename output files run: | cd output for f in \*; do mv "$f" "${f%.\*}-${GITHUB\_REF/refs\\/tags\\//}.${f##\*.}"; done - name: Upload installer to s3 run: aws s3 cp output/\* s3://client-builds/releases/
The very last line:
run: aws s3 cp output/* s3://client-builds/releases
fails with "Unknown options: s3://client-builds/releases/". This script has not changed, so I'm not sure what's wrong. Can someone shed some light?
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.