diff --git a/.github/workflows/_pkg_build.yaml b/.github/workflows/_pkg_build.yaml index 1832bcf8..024efc6c 100644 --- a/.github/workflows/_pkg_build.yaml +++ b/.github/workflows/_pkg_build.yaml @@ -80,7 +80,7 @@ jobs: run: pipx run twine check dist/* build-wheels: - name: 'Native Binary Distribution / ${{ matrix.os }}' + name: 'Native Binary Distribution: ${{ matrix.os }}' if: fromJSON(inputs.metadata).package.pure_python == false runs-on: ${{ matrix.platform.runner }} strategy: diff --git a/.github/workflows/_pkg_lint.yaml b/.github/workflows/_pkg_lint.yaml index 0f8791ec..76edb645 100644 --- a/.github/workflows/_pkg_lint.yaml +++ b/.github/workflows/_pkg_lint.yaml @@ -167,7 +167,7 @@ jobs: category: "bandit" mypy: - name: 'MyPy / Python ${{ matrix.python-version }} / ${{ matrix.os }}' + name: 'MyPy (${{ matrix.os }}, Py ${{ matrix.python-version }})' strategy: fail-fast: false matrix: @@ -237,7 +237,7 @@ jobs: path: ${{ fromJSON(inputs.metadata).path.dir.local }}/.temp pylint: - name: 'PyLint / ${{ matrix.os }}' + name: 'PyLint (${{ matrix.os }})' strategy: fail-fast: false matrix: diff --git a/.github/workflows/_pkg_test.yaml b/.github/workflows/_pkg_test.yaml index 81b13388..c186bca4 100644 --- a/.github/workflows/_pkg_test.yaml +++ b/.github/workflows/_pkg_test.yaml @@ -38,7 +38,7 @@ on: jobs: test: - name: 'Python ${{ matrix.python-version }} / ${{ matrix.os }}' + name: '${{ matrix.os }} - Py ${{ matrix.python-version }}' strategy: fail-fast: false matrix: diff --git a/.github/workflows/_repodynamics.yaml b/.github/workflows/_repodynamics.yaml new file mode 100644 index 00000000..06aeff83 --- /dev/null +++ b/.github/workflows/_repodynamics.yaml @@ -0,0 +1,81 @@ +name: '[Callable]: RepoDynamics' + +on: + workflow_call: + inputs: + meta-sync: + type: string + default: report + required: false + description: | + The action to take when the dynamic files are out of sync with the repository meta content. + Selecting 'none' will disable this action. + hooks: + type: string + default: report + required: false + description: | + The action to take when running the workflow hooks. + Selecting 'none' will disable this action. + package-build: + type: boolean + required: false + default: false + description: | + Build the package and upload the builds as artifacts. + package-lint: + type: boolean + required: false + default: false + description: | + Run the linting workflow. + package-test: + type: boolean + required: false + default: false + description: | + Run the test workflow on package. + website-build: + type: boolean + required: false + default: false + description: | + Build the documentation with Sphinx and upload the builds as artifacts. + outputs: + config: ${{ jobs.init.outputs.config }} + metadata: ${{ jobs.init.outputs.metadata }} + +jobs: + init: + name: 'Init' + runs-on: ubuntu-latest + permissions: + contents: write + issues: write + pull-requests: write + outputs: + config: ${{ steps.init.outputs.config }} + metadata: ${{ steps.init.outputs.metadata-ci }} + steps: + - id: init + uses: repodynamics/init@main + with: + admin-token: ${{ secrets.REPO_ADMIN_TOKEN }} + package-build: ${{ inputs.package-build }} + package-lint: ${{ inputs.package-lint }} + package-test: ${{ inputs.package-test }} + website-build: ${{ inputs.website-build }} + meta-sync: ${{ inputs.meta-sync }} + hooks: ${{ inputs.hooks }} + + init-fail: + name: 'Status' + runs-on: ubuntu-latest + needs: init + steps: + - run: | + if [ "${{ fromJSON(needs.init.outputs.config).fail }}" = "true" ]; then + exit 1 + else + exit 0 + fi \ No newline at end of file diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 109da0d9..83662533 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -77,39 +77,18 @@ on: Build the documentation with Sphinx and upload the builds as artifacts. jobs: - init: - name: 'RepoDynamics / Init' - runs-on: ubuntu-latest - permissions: - contents: write - issues: write - pull-requests: write - outputs: - config: ${{ steps.init.outputs.config }} - metadata: ${{ steps.init.outputs.metadata-ci }} - steps: - - id: init - uses: repodynamics/init@main - with: - admin-token: ${{ secrets.REPO_ADMIN_TOKEN }} - package-build: ${{ inputs.package-build }} - package-lint: ${{ inputs.package-lint }} - package-test: ${{ inputs.package-test }} - website-build: ${{ inputs.website-build }} - meta-sync: ${{ inputs.meta-sync }} - hooks: ${{ inputs.hooks }} - init-fail: - name: 'RepoDynamics / Status' - runs-on: ubuntu-latest - needs: init - steps: - - run: | - if [ "${{ fromJSON(needs.init.outputs.config).fail }}" = "true" ]; then - exit 1 - else - exit 0 - fi + init: + name: 'RepoDynamics' + uses: ./.github/workflows/_repodynamics.yaml + with: + admin-token: ${{ secrets.REPO_ADMIN_TOKEN }} + package-build: ${{ inputs.package-build }} + package-lint: ${{ inputs.package-lint }} + package-test: ${{ inputs.package-test }} + website-build: ${{ inputs.website-build }} + meta-sync: ${{ inputs.meta-sync }} + hooks: ${{ inputs.hooks }} build: name: 'Package Build'