Skip to content

Glitch Clean Up (#432) #13

Glitch Clean Up (#432)

Glitch Clean Up (#432) #13

name: publish-workers
on:
push:
branches:
- main
paths:
- 'workers/**'
jobs:
directories:
runs-on: ubuntu-latest
outputs:
dir: ${{ steps.set-dirs.outputs.dir }}
steps:
- uses: actions/checkout@v2
- id: set-dirs
run: echo "::set-output name=dir::$(ls -d */ | jq -R -s -c 'split("\n")[:-1]')"
working-directory: workers
publish:
runs-on: ubuntu-latest
needs: [directories]
strategy:
matrix:
dir: ${{fromJson(needs.directories.outputs.dir)}}
steps:
- uses: actions/checkout@v2
- run: 'yarn'
working-directory: workers/${{matrix.dir}}
- uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
workingDirectory: workers/${{matrix.dir}}