--- name: Deploy on: [push, workflow_dispatch] jobs: affected: uses: lunarmodules/.github/.github/workflows/list_affected_rockspecs.yml@d3b39c89365b06e9590297cfaa0b3c9e52c04b6d # main build: needs: affected if: ${{ needs.affected.outputs.rockspecs }} uses: lunarmodules/.github/.github/workflows/test_build_rock.yml@5e21af2b298be5ad6677a4737114db239510d3ce # main with: rockspecs: ${{ needs.affected.outputs.rockspecs }} upload: needs: [affected, build] # Only run upload if: # 1. We are on the canonical repository (no uploads from forks) # 2. The current commit is either tagged or on the default branch (the # workflow will upload dev/scm rockspecs any time they are touched, # tagged ones whenever the edited rockspec and tag match) # 3. Some rockspecs were changed — this implies the commit changing the # rockspec is the same one that gets tagged if: >- ${{ github.repository == 'lunarmodules/luasystem' && ( github.ref_name == 'master' || startsWith(github.ref, 'refs/tags/') ) && needs.affected.outputs.rockspecs }} uses: lunarmodules/.github/.github/workflows/upload_to_luarocks.yml@5e21af2b298be5ad6677a4737114db239510d3ce # main with: rockspecs: ${{ needs.affected.outputs.rockspecs }} secrets: apikey: ${{ secrets.LUAROCKS_APIKEY }}