Skip to content

Commit

Permalink
Upload study-batches.txt once, fix batches variable
Browse files Browse the repository at this point in the history
  • Loading branch information
flomnes committed Mar 1, 2022
1 parent 80ae7d1 commit 33bc717
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/generate-archives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,22 @@ jobs:
- name: Read study-batches.txt
id: read_batches
run: |
BATCHES=$(tr '\n' ',' < $GITHUB_WORKSPACE/study-batches.txt | sed "s/^/[/;s/,$/]/")
BATCHES=$(printf "'%s'," $(cat study-batches.txt) | sed "s/^/[/;s/,$/]/")
echo "::set-output name=batches::$BATCHES"
- name: Get release
id: get_release
uses: bruceadams/[email protected]

- name: Upload study-batches.txt
uses: actions/[email protected]
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: study-batches.txt
asset_name: study-batches.txt
asset_content_type: application/octet-stream


main:
runs-on: ubuntu-latest
needs: read_batches
Expand All @@ -47,11 +60,3 @@ jobs:
asset_path: output.zip
asset_name: ${{ matrix.batch }}.zip
asset_content_type: application/octet-stream

- name: Upload study-batches.txt
uses: actions/[email protected]
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: study-batches.txt
asset_name: study-batches.txt
asset_content_type: application/octet-stream

0 comments on commit 33bc717

Please sign in to comment.