mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 02:56:56 +08:00
Test new job templates.
This commit is contained in:
16
.github/workflows/CompletePipeline.yml
vendored
16
.github/workflows/CompletePipeline.yml
vendored
@@ -125,6 +125,9 @@ on:
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
Prepare:
|
||||
uses: pyTooling/Actions/.github/workflows/PrepareJob.yml@dev
|
||||
|
||||
ConfigParams:
|
||||
uses: pyTooling/Actions/.github/workflows/ExtractConfiguration.yml@dev
|
||||
with:
|
||||
@@ -309,12 +312,21 @@ jobs:
|
||||
typing: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
|
||||
|
||||
ReleasePage:
|
||||
uses: pyTooling/Actions/.github/workflows/Release.yml@dev
|
||||
uses: pyTooling/Actions/.github/workflows/PublishReleaseNotes.yml@dev
|
||||
if: startsWith(github.ref, 'refs/tags')
|
||||
needs:
|
||||
- Package
|
||||
- Prepare
|
||||
- UnitTesting
|
||||
# - AppTesting
|
||||
# - StaticTypeCheck
|
||||
- Package
|
||||
- PublishToGitHubPages
|
||||
secrets: inherit
|
||||
permissions:
|
||||
contents: write
|
||||
actions: write
|
||||
with:
|
||||
tag: ${{ needs.Prepare.outputs.version }}
|
||||
|
||||
PublishOnPyPI:
|
||||
uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@dev
|
||||
|
||||
84
.github/workflows/TagReleaseCommit.yml
vendored
Normal file
84
.github/workflows/TagReleaseCommit.yml
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
# ==================================================================================================================== #
|
||||
# Authors: #
|
||||
# Patrick Lehmann #
|
||||
# Unai Martinez-Corral #
|
||||
# #
|
||||
# ==================================================================================================================== #
|
||||
# Copyright 2020-2025 The pyTooling Authors #
|
||||
# #
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
||||
# you may not use this file except in compliance with the License. #
|
||||
# You may obtain a copy of the License at #
|
||||
# #
|
||||
# http://www.apache.org/licenses/LICENSE-2.0 #
|
||||
# #
|
||||
# Unless required by applicable law or agreed to in writing, software #
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, #
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
|
||||
# See the License for the specific language governing permissions and #
|
||||
# limitations under the License. #
|
||||
# #
|
||||
# SPDX-License-Identifier: Apache-2.0 #
|
||||
# ==================================================================================================================== #
|
||||
name: Auto Tag
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
ubuntu_image:
|
||||
description: 'Name of the Ubuntu image.'
|
||||
required: false
|
||||
default: 'ubuntu-24.04'
|
||||
type: string
|
||||
version:
|
||||
description: 'Version used as tag name.'
|
||||
required: true
|
||||
type: string
|
||||
auto_tag:
|
||||
description: 'Automatically add and push a tag.'
|
||||
required: true
|
||||
type: string
|
||||
workflow:
|
||||
description: 'Workflow to start after adding a tag.'
|
||||
required: false
|
||||
default: 'Pipeline.yml'
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
AutoTag:
|
||||
name: "🏷 Create tag '${{ inputs.version}}' on GitHub"
|
||||
runs-on: ${{ inputs.ubuntu_image }}
|
||||
if: inputs.auto_tag == 'true'
|
||||
|
||||
# if: github.ref == 'refs/heads/${{ inputs.release_branch }}'
|
||||
|
||||
permissions:
|
||||
contents: write # required for tag creation
|
||||
actions: write # required to start a new pipeline
|
||||
|
||||
steps:
|
||||
- name: 🏷 Create release tag '${{ steps.FindPullRequest.outputs.version }}'
|
||||
uses: actions/github-script@v7
|
||||
id: createReleaseTag
|
||||
# if: inputs.auto_tag == 'true'
|
||||
with:
|
||||
script: |
|
||||
github.rest.git.createRef({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
ref: 'refs/tags/${{ inputs.version }}',
|
||||
sha: context.sha
|
||||
})
|
||||
|
||||
- name: Trigger Workflow
|
||||
uses: actions/github-script@v7
|
||||
id: runReleaseTag
|
||||
# if: inputs.auto_tag == 'true'
|
||||
with:
|
||||
script: |
|
||||
github.rest.actions.createWorkflowDispatch({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
workflow_id: '${{ inputs.workflow }}',
|
||||
ref: '${{ inputs.version }}'
|
||||
})
|
||||
37
.github/workflows/_Checking_JobTemplates.yml
vendored
37
.github/workflows/_Checking_JobTemplates.yml
vendored
@@ -5,6 +5,9 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
Prepare:
|
||||
uses: pyTooling/Actions/.github/workflows/PrepareJob.yml@dev
|
||||
|
||||
ConfigParams:
|
||||
uses: pyTooling/Actions/.github/workflows/ExtractConfiguration.yml@dev
|
||||
with:
|
||||
@@ -185,19 +188,43 @@ jobs:
|
||||
- PublishCoverageResults
|
||||
- StaticTypeCheck
|
||||
with:
|
||||
doc: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }}
|
||||
doc: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }}
|
||||
coverage: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
|
||||
typing: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
|
||||
typing: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
|
||||
|
||||
ReleasePage:
|
||||
uses: pyTooling/Actions/.github/workflows/Release.yml@dev
|
||||
if: startsWith(github.ref, 'refs/tags')
|
||||
TriggerTaggedRelease:
|
||||
uses: pyTooling/Actions/.github/workflows/TagReleaseCommit.yml@dev
|
||||
needs:
|
||||
- Prepare
|
||||
- UnitTesting
|
||||
- PlatformTesting
|
||||
# - StaticTypeCheck
|
||||
- Package
|
||||
- PublishToGitHubPages
|
||||
permissions:
|
||||
contents: write # required for create tag
|
||||
actions: write # required for trigger workflow
|
||||
with:
|
||||
version: ${{ needs.Prepare.outputs.version }}
|
||||
auto_tag: ${{ needs.Prepare.outputs.is_release_commit }}
|
||||
secrets: inherit
|
||||
|
||||
ReleasePage:
|
||||
uses: pyTooling/Actions/.github/workflows/PublishReleaseNotes.yml@dev
|
||||
if: startsWith(github.ref, 'refs/tags')
|
||||
needs:
|
||||
- Prepare
|
||||
- UnitTesting
|
||||
- PlatformTesting
|
||||
# - StaticTypeCheck
|
||||
- Package
|
||||
- PublishToGitHubPages
|
||||
secrets: inherit
|
||||
permissions:
|
||||
contents: write
|
||||
actions: write
|
||||
with:
|
||||
tag: ${{ needs.Prepare.outputs.version }}
|
||||
|
||||
PublishOnPyPI:
|
||||
uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@dev
|
||||
|
||||
Reference in New Issue
Block a user