Skip to content

Commit

Permalink
use vars.CURRENT_TOOL (#70)
Browse files Browse the repository at this point in the history
rename action: checks -> _checks
  • Loading branch information
hemnstill authored Jun 28, 2023
1 parent 4003acc commit 2a6cbf6
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 177 deletions.
File renamed without changes.
13 changes: 2 additions & 11 deletions .github/workflows/ansible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,16 @@ name: ansible
on: [pull_request, workflow_dispatch]

jobs:
prejob:
uses: ./.github/workflows/set-output-workflow.yml
with:
workflow: ${{ github.workflow }}
secrets:
_WORKFLOW: ${{ secrets._CURRENT_TOOL }}

alpine-gnu:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-alpine.yml
with:
workflow: ${{ github.workflow }}
toolset: gnu
version: 3.18.0

ubuntu-docker:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-docker.yml
with:
workflow: ${{ github.workflow }}
Expand Down
19 changes: 5 additions & 14 deletions .github/workflows/bsdtar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,37 @@ name: bsdtar
on: [pull_request, workflow_dispatch]

jobs:
prejob:
uses: ./.github/workflows/set-output-workflow.yml
with:
workflow: ${{ github.workflow }}
secrets:
_WORKFLOW: ${{ secrets._CURRENT_TOOL }}

alpine-musl:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-alpine.yml
with:
workflow: ${{ github.workflow }}

windows-mingw:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-windows.yml
with:
workflow: ${{ github.workflow }}

test-alpine:
needs: alpine-musl
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/test-alpine.yml
with:
workflow: ${{ github.workflow }}
artifact: build-musl

test-ubuntu:
needs: alpine-musl
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/test-ubuntu.yml
with:
workflow: ${{ github.workflow }}
artifact: build-musl

test-windows:
needs: windows-mingw
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/test-windows.yml
with:
workflow: ${{ github.workflow }}
Expand Down
19 changes: 5 additions & 14 deletions .github/workflows/busybox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,38 @@ name: busybox
on: [pull_request, workflow_dispatch]

jobs:
prejob:
uses: ./.github/workflows/set-output-workflow.yml
with:
workflow: ${{ github.workflow }}
secrets:
_WORKFLOW: ${{ secrets._CURRENT_TOOL }}

alpine-musl:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-alpine.yml
with:
workflow: ${{ github.workflow }}

alpine-mingw:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-alpine.yml
with:
workflow: ${{ github.workflow }}
toolset: mingw

test-alpine:
needs: alpine-musl
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/test-alpine.yml
with:
workflow: ${{ github.workflow }}
artifact: build-musl

test-ubuntu:
needs: alpine-musl
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/test-ubuntu.yml
with:
workflow: ${{ github.workflow }}
artifact: build-musl

test-windows:
needs: alpine-mingw
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/test-windows.yml
with:
workflow: ${{ github.workflow }}
Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/far2l.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,21 @@ name: far2l
on: [pull_request, workflow_dispatch]

jobs:
prejob:
uses: ./.github/workflows/set-output-workflow.yml
with:
workflow: ${{ github.workflow }}
secrets:
_WORKFLOW: ${{ secrets._CURRENT_TOOL }}

alpine-musl:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-alpine.yml
with:
workflow: ${{ github.workflow }}

ubuntu-glibc:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-ubuntu.yml
with:
workflow: ${{ github.workflow }}
version: 18.04

ubuntu-glibc-p:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-ubuntu.yml
with:
workflow: ${{ github.workflow }}
Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,20 @@ name: mypy
on: [pull_request, workflow_dispatch]

jobs:
prejob:
uses: ./.github/workflows/set-output-workflow.yml
with:
workflow: ${{ github.workflow }}
secrets:
_WORKFLOW: ${{ secrets._CURRENT_TOOL }}

alpine-musl:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-alpine.yml
with:
workflow: ${{ github.workflow }}

ubuntu-gnu:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-ubuntu.yml
with:
workflow: ${{ github.workflow }}

windows-msvc:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-windows.yml
with:
workflow: ${{ github.workflow }}
Expand Down
18 changes: 2 additions & 16 deletions .github/workflows/openssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,8 @@ env:
IMAGE_NAME: mcr.microsoft.com/windows/nanoserver:ltsc2022-amd64

jobs:
prejob:
runs-on: ubuntu-latest
environment: release
outputs:
tool: ${{ steps.setvar.outputs.envvar }}
steps:
- id: setvar
run: |
echo ${{ secrets._CURRENT_TOOL }} > CI_ENV
echo "::set-output name=envvar::$(sed -e 's/^_//' CI_ENV)"
- run: echo CURRENT_TOOL '${{ steps.setvar.outputs.envvar }}'

openssl-alpine-musl:
needs: prejob
if: ${{ needs.prejob.outputs.tool=='openssl' }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
runs-on: ubuntu-latest
container: alpine:3.15.0
steps:
Expand All @@ -39,8 +26,7 @@ jobs:
./openssl/release/_musl.tar.gz
openssl-alpine-mingw:
needs: prejob
if: ${{ needs.prejob.outputs.tool=='openssl' }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
runs-on: ubuntu-latest
container: alpine:3.15.0
steps:
Expand Down
13 changes: 2 additions & 11 deletions .github/workflows/pcre2grep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,14 @@ name: pcre2grep
on: [pull_request, workflow_dispatch]

jobs:
prejob:
uses: ./.github/workflows/set-output-workflow.yml
with:
workflow: ${{ github.workflow }}
secrets:
_WORKFLOW: ${{ secrets._CURRENT_TOOL }}

alpine-musl:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-alpine.yml
with:
workflow: ${{ github.workflow }}

windows-msvc:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-windows.yml
with:
workflow: ${{ github.workflow }}
Expand Down
19 changes: 5 additions & 14 deletions .github/workflows/pg_dump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,38 @@ name: pg_dump
on: [pull_request, workflow_dispatch]

jobs:
prejob:
uses: ./.github/workflows/set-output-workflow.yml
with:
workflow: ${{ github.workflow }}
secrets:
_WORKFLOW: ${{ secrets._CURRENT_TOOL }}

alpine-musl:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-alpine.yml
with:
workflow: ${{ github.workflow }}

alpine-mingw:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-alpine.yml
with:
workflow: ${{ github.workflow }}
toolset: mingw

alpine-musl-test:
needs: alpine-musl
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/test-alpine.yml
with:
workflow: ${{ github.workflow }}
artifact: build-musl

ubuntu-glibc-test:
needs: alpine-musl
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/test-ubuntu.yml
with:
workflow: ${{ github.workflow }}
artifact: build-musl

windows-mingw-test:
needs: alpine-mingw
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/test-windows.yml
with:
workflow: ${{ github.workflow }}
Expand Down
13 changes: 2 additions & 11 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,15 @@ name: playwright
on: [pull_request, workflow_dispatch]

jobs:
prejob:
uses: ./.github/workflows/set-output-workflow.yml
with:
workflow: ${{ github.workflow }}
secrets:
_WORKFLOW: ${{ secrets._CURRENT_TOOL }}

ubuntu-gnu:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-ubuntu.yml
with:
workflow: ${{ github.workflow }}
toolset: gnu

windows-msvc:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-windows.yml
with:
workflow: ${{ github.workflow }}
Expand Down
13 changes: 2 additions & 11 deletions .github/workflows/poetry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,14 @@ name: poetry
on: [pull_request, workflow_dispatch]

jobs:
prejob:
uses: ./.github/workflows/set-output-workflow.yml
with:
workflow: ${{ github.workflow }}
secrets:
_WORKFLOW: ${{ secrets._CURRENT_TOOL }}

ubuntu-gnu:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-ubuntu.yml
with:
workflow: ${{ github.workflow }}

windows-msvc:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-windows.yml
with:
workflow: ${{ github.workflow }}
Expand Down
13 changes: 2 additions & 11 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,14 @@ name: pylint
on: [pull_request, workflow_dispatch]

jobs:
prejob:
uses: ./.github/workflows/set-output-workflow.yml
with:
workflow: ${{ github.workflow }}
secrets:
_WORKFLOW: ${{ secrets._CURRENT_TOOL }}

ubuntu-gnu:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-ubuntu.yml
with:
workflow: ${{ github.workflow }}

windows-msvc:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
if: ${{ vars.CURRENT_TOOL == github.workflow }}
uses: ./.github/workflows/build-windows.yml
with:
workflow: ${{ github.workflow }}
Expand Down
Loading

0 comments on commit 2a6cbf6

Please sign in to comment.