Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Githib Workflow Script Failing

Githib Workflow Script Failing

Scheduled Pinned Locked Moved The Lounge
workspacelinuxcloudtoolshelp
7 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kevin Marois
    wrote on last edited by
    #1

    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: 20

    environment:
      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.

    OriginalGriffO P S R 4 Replies Last reply
    0
    • K Kevin Marois

      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: 20

      environment:
        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.

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      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 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

      1 Reply Last reply
      0
      • K Kevin Marois

        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: 20

        environment:
          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.

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #3

        Why not use something that was already built for this purpose? S3 cp file · Actions · GitHub Marketplace · GitHub[^]

        Advanced TypeScript Programming Projects

        K 1 Reply Last reply
        0
        • P Pete OHanlon

          Why not use something that was already built for this purpose? S3 cp file · Actions · GitHub Marketplace · GitHub[^]

          Advanced TypeScript Programming Projects

          K Offline
          K Offline
          Kevin Marois
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • K Kevin Marois

            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: 20

            environment:
              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.

            S Offline
            S Offline
            Slacker007
            wrote on last edited by
            #5

            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

            K 1 Reply Last reply
            0
            • S Slacker007

              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

              K Offline
              K Offline
              Kevin Marois
              wrote on last edited by
              #6

              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.

              1 Reply Last reply
              0
              • K Kevin Marois

                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: 20

                environment:
                  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.

                R Offline
                R Offline
                RedDk
                wrote on last edited by
                #7

                - Uncategorised posts - Discussion Boards[^] even though finding the appropriateness of using it is masked by it's absence in the dropdown list of discussions.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups