Install the workflow that publishes accepted milestones #104
@@ -0,0 +1,89 @@
|
|||||||
|
# Publish accepted milestones to the git host.
|
||||||
|
#
|
||||||
|
# On a push to main that changes docs/milestones/ or docs/sqa/reviews/, this
|
||||||
|
# workflow runs `sync-project.sh --accepted-only --apply`: every milestone whose
|
||||||
|
# latest Version History row is Accepted and whose latest review record is a Go
|
||||||
|
# is created or updated as a Milestone with its tasks as Issues. A Proposed
|
||||||
|
# milestone, or one without a Go review, is skipped. Nothing is closed or
|
||||||
|
# deleted. Each run updates the issues of every accepted milestone (the sync is
|
||||||
|
# idempotent, but the host records the edit).
|
||||||
|
#
|
||||||
|
# INSTALLING THIS FILE IS THE STANDING AUTHORIZATION TO PUBLISH. This project
|
||||||
|
# installed it on 2026-10-11 at the request of S01.
|
||||||
|
#
|
||||||
|
# Secret: TOKEN_FOR_GITEA, the bare Gitea token of the organization (no JSON).
|
||||||
|
# It needs read and write on issues and milestones, and read on the framework
|
||||||
|
# repository, which is checked out as a submodule. Gitea does not accept secret
|
||||||
|
# names that start with GITEA_ or GITHUB_.
|
||||||
|
#
|
||||||
|
# Run it once by hand from the Actions page with dry_run left on: it prints
|
||||||
|
# the plan and creates nothing. Turn dry_run off only for a real run.
|
||||||
|
# A runner must be registered for the repository (or its organisation).
|
||||||
|
|
||||||
|
name: Publish accepted milestones
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
paths:
|
||||||
|
- "docs/milestones/**"
|
||||||
|
- "docs/sqa/reviews/**"
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
dry_run:
|
||||||
|
description: "Preview only: print the plan and create nothing"
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
|
||||||
|
# Two merges in a row queue instead of racing.
|
||||||
|
concurrency:
|
||||||
|
group: publish-accepted-milestones
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out the project
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.TOKEN_FOR_GITEA }}
|
||||||
|
|
||||||
|
# .gitmodules uses ssh:// URLs and the runner has no SSH key, so the
|
||||||
|
# submodules (framework, and framework/qc inside it) are fetched over HTTPS
|
||||||
|
# with the same token. The token goes through the environment, not a
|
||||||
|
# command line.
|
||||||
|
- name: Check out the framework submodules over HTTPS
|
||||||
|
env:
|
||||||
|
GIT_CONFIG_COUNT: "2"
|
||||||
|
GIT_CONFIG_KEY_0: "url.https://git.tirsystem.com/.insteadOf"
|
||||||
|
GIT_CONFIG_VALUE_0: "ssh://git@git.tirsystem.com:10022/"
|
||||||
|
GIT_CONFIG_KEY_1: "http.extraheader"
|
||||||
|
GIT_CONFIG_VALUE_1: "Authorization: token ${{ secrets.TOKEN_FOR_GITEA }}"
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
git submodule update --init --recursive --depth=1
|
||||||
|
|
||||||
|
- name: Make sure curl and jq are available
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
if command -v curl >/dev/null && command -v jq >/dev/null; then exit 0; fi
|
||||||
|
sudo_cmd=""
|
||||||
|
if [ "$(id -u)" -ne 0 ]; then sudo_cmd="sudo"; fi
|
||||||
|
$sudo_cmd apt-get update -qq
|
||||||
|
$sudo_cmd apt-get install -y -qq curl jq
|
||||||
|
|
||||||
|
- name: Publish accepted milestones
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.TOKEN_FOR_GITEA }}
|
||||||
|
# Empty on a push (a real run); "true" or "false" on a manual run.
|
||||||
|
DRY_RUN: ${{ inputs.dry_run }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
if [ "$DRY_RUN" = "true" ]; then
|
||||||
|
bash framework/scripts/sync-project.sh --accepted-only
|
||||||
|
else
|
||||||
|
bash framework/scripts/sync-project.sh --accepted-only --apply
|
||||||
|
fi
|
||||||
@@ -17,11 +17,11 @@ A collection of reusable Gitea Actions workflows for DevOps professionals and so
|
|||||||
|
|
||||||
This repository is the central collection of reusable automation for TirSystem repositories. The primary repository lives at `git.tirsystem.com` (Gitea) and is push-mirrored to GitHub.
|
This repository is the central collection of reusable automation for TirSystem repositories. The primary repository lives at `git.tirsystem.com` (Gitea) and is push-mirrored to GitHub.
|
||||||
|
|
||||||
It contains five workflows: metadata sync to the GitHub mirror, wiki publishing, shared quality checks, a release workflow and the repository's own validation. They are listed with their purpose and a diagram under [Workflows](#-workflows).
|
It contains six workflows: metadata sync to the GitHub mirror, wiki publishing, shared quality checks, a release workflow, the publishing of accepted milestones and the repository's own validation. They are listed with their purpose and a diagram under [Workflows](#-workflows).
|
||||||
|
|
||||||
## 🔧 Workflows
|
## 🔧 Workflows
|
||||||
|
|
||||||
Five workflows live in this repository. A **scoped** workflow is delivered by the instance to every repository of the TirSystem organizations and needs nothing in the repository; a **reusable** workflow is called by a repository with `uses:`; the others run only here. The diagrams are PlantUML source.
|
Six workflows live in this repository. A **scoped** workflow is delivered by the instance to every repository of the TirSystem organizations and needs nothing in the repository; a **reusable** workflow is called by a repository with `uses:`; the others run only here. The diagrams are PlantUML source.
|
||||||
|
|
||||||
| Workflow | File | Kind | Starts on | Purpose |
|
| Workflow | File | Kind | Starts on | Purpose |
|
||||||
| --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- |
|
||||||
@@ -29,6 +29,7 @@ Five workflows live in this repository. A **scoped** workflow is delivered by th
|
|||||||
| Publish wiki | [`publish-wiki.yml`](.gitea/scoped_workflows/publish-wiki.yml) | Scoped, opt-in with `wiki/.publish` | push to `main` that changes `wiki/**`, manual | Publishes the pages in `wiki/` to the repository wiki |
|
| Publish wiki | [`publish-wiki.yml`](.gitea/scoped_workflows/publish-wiki.yml) | Scoped, opt-in with `wiki/.publish` | push to `main` that changes `wiki/**`, manual | Publishes the pages in `wiki/` to the repository wiki |
|
||||||
| Quality checks | [`quality-checks.yml`](.gitea/workflows/quality-checks.yml) | Reusable (`workflow_call`) | a call from another repository | Runs ruff, mypy, shellcheck and shfmt on the tracked files and changes nothing |
|
| Quality checks | [`quality-checks.yml`](.gitea/workflows/quality-checks.yml) | Reusable (`workflow_call`) | a call from another repository | Runs ruff, mypy, shellcheck and shfmt on the tracked files and changes nothing |
|
||||||
| Release | [`release.yml`](.gitea/workflows/release.yml) | This repository only | manual | Creates the version tag, the release page and the major tag after the checks |
|
| Release | [`release.yml`](.gitea/workflows/release.yml) | This repository only | manual | Creates the version tag, the release page and the major tag after the checks |
|
||||||
|
| Publish accepted milestones | [`sync-milestones.yml`](.gitea/workflows/sync-milestones.yml) | This repository only | push to `main` that changes `docs/milestones/**` or `docs/sqa/reviews/**`, manual (dry run by default) | Creates or updates the Gitea milestone and issues of every milestone that is Accepted with a Go review |
|
||||||
| Validate workflows | [`validate-workflows.yml`](.gitea/workflows/validate-workflows.yml) | This repository only | pull request, push to `main`, manual | Parses every workflow and runs the offline tests |
|
| Validate workflows | [`validate-workflows.yml`](.gitea/workflows/validate-workflows.yml) | This repository only | pull request, push to `main`, manual | Parses every workflow and runs the offline tests |
|
||||||
|
|
||||||
### 🔄 Sync GitHub metadata
|
### 🔄 Sync GitHub metadata
|
||||||
@@ -236,6 +237,54 @@ deactivate Workflow
|
|||||||
@enduml
|
@enduml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 📌 Publish accepted milestones
|
||||||
|
|
||||||
|
Standing authorization to publish: on a push to `main` that changes the milestones or their reviews, every milestone whose latest Version History row is Accepted and whose latest review is a Go is created or updated on Gitea with its tasks as issues. Nothing is closed or deleted. A manual run is a dry run unless `dry_run` is switched off. It uses the secret `TOKEN_FOR_GITEA` and the `--accepted-only` rule of the mounted framework (v0.5.0 or later).
|
||||||
|
|
||||||
|
#### 🔀 Workflow
|
||||||
|
|
||||||
|
```plantuml
|
||||||
|
@startuml
|
||||||
|
title Publish accepted milestones (this repository)
|
||||||
|
|
||||||
|
autonumber
|
||||||
|
|
||||||
|
actor "Push to main that changes\ndocs/milestones/** or docs/sqa/reviews/**,\nor manual trigger" as Trigger
|
||||||
|
participant "Gitea Actions\nsync-milestones" as Workflow
|
||||||
|
participant "framework/scripts/\nsync-project.sh" as Script
|
||||||
|
participant "Gitea REST API" as Gitea
|
||||||
|
|
||||||
|
Trigger -> Workflow: Start workflow
|
||||||
|
activate Workflow
|
||||||
|
Workflow -> Workflow: Check out the project and the framework\nsubmodules over HTTPS with TOKEN_FOR_GITEA
|
||||||
|
Workflow -> Script: --accepted-only (dry run)\nor --accepted-only --apply
|
||||||
|
activate Script
|
||||||
|
|
||||||
|
loop for each docs/milestones/mil-*.md
|
||||||
|
alt latest Version History row is not Accepted,\nor the latest review record is not a Go
|
||||||
|
Script -> Script: Skip with the reason on stderr
|
||||||
|
else
|
||||||
|
alt dry run
|
||||||
|
Script -> Script: Print the plan, no network call
|
||||||
|
else
|
||||||
|
Script -> Gitea: Create or update the Milestone\nand one Issue per task row
|
||||||
|
Gitea --> Script: Milestone and issue numbers
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
note right of Script
|
||||||
|
Nothing is closed or deleted.
|
||||||
|
Each real run edits the issues
|
||||||
|
of every accepted milestone.
|
||||||
|
end note
|
||||||
|
Script --> Workflow: Done, or "nothing to publish"
|
||||||
|
deactivate Script
|
||||||
|
Workflow --> Trigger: Workflow result
|
||||||
|
deactivate Workflow
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
### 🧪 Validate workflows
|
### 🧪 Validate workflows
|
||||||
|
|
||||||
The repository's own validation: the offline tests that gate every pull request.
|
The repository's own validation: the offline tests that gate every pull request.
|
||||||
|
|||||||
+1
-1
Submodule framework updated: 14d221ec1c...4fd69c4970
+52
-3
@@ -1,4 +1,4 @@
|
|||||||
<!-- translation of Home.md, source sha256 510b243ec5f2 -->
|
<!-- translation of Home.md, source sha256 c9c04abaf4ae -->
|
||||||
|
|
||||||
> Dette er en oversættelse af [`Home`](Home). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
> Dette er en oversættelse af [`Home`](Home). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
||||||
|
|
||||||
@@ -13,12 +13,12 @@ En samling af genbrugelige Gitea Actions-workflows til DevOps-professionelle og
|
|||||||
|
|
||||||
Dette repository er den centrale samling af genbrugelig automatisering til TirSystems repositories. Det primære repository ligger på `git.tirsystem.com` (Gitea) og spejles med push til GitHub.
|
Dette repository er den centrale samling af genbrugelig automatisering til TirSystems repositories. Det primære repository ligger på `git.tirsystem.com` (Gitea) og spejles med push til GitHub.
|
||||||
|
|
||||||
Det indeholder fem workflows: synkronisering af metadata til GitHub-spejlet, publicering af wiki, fælles kvalitetskontrol, et udgivelsesworkflow og repositoryets egen validering. De er listet med formål og diagram under [Workflows](#workflows).
|
Det indeholder seks workflows: synkronisering af metadata til GitHub-spejlet, publicering af wiki, fælles kvalitetskontrol, et udgivelsesworkflow, publicering af accepterede milepæle og repositoryets egen validering. De er listet med formål og diagram under [Workflows](#workflows).
|
||||||
|
|
||||||
|
|
||||||
## Workflows
|
## Workflows
|
||||||
|
|
||||||
Der er fem workflows i dette repository. Et **scoped** workflow leveres af instansen til alle repositories i TirSystem-organisationerne og kræver intet i repositoryet; et **genbrugeligt** workflow kaldes fra et repository med `uses:`; de øvrige kører kun her. Diagrammerne er PlantUML-kildekode og er på engelsk.
|
Der er seks workflows i dette repository. Et **scoped** workflow leveres af instansen til alle repositories i TirSystem-organisationerne og kræver intet i repositoryet; et **genbrugeligt** workflow kaldes fra et repository med `uses:`; de øvrige kører kun her. Diagrammerne er PlantUML-kildekode og er på engelsk.
|
||||||
|
|
||||||
| Workflow | Fil | Type | Starter ved | Formål |
|
| Workflow | Fil | Type | Starter ved | Formål |
|
||||||
| --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- |
|
||||||
@@ -26,6 +26,7 @@ Der er fem workflows i dette repository. Et **scoped** workflow leveres af insta
|
|||||||
| Publish wiki | [`publish-wiki.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/scoped_workflows/publish-wiki.yml) | Scoped, tilmelding med `wiki/.publish` | push til `main`, der ændrer `wiki/**`, manuelt | Publicerer siderne i `wiki/` til repositoryets wiki |
|
| Publish wiki | [`publish-wiki.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/scoped_workflows/publish-wiki.yml) | Scoped, tilmelding med `wiki/.publish` | push til `main`, der ændrer `wiki/**`, manuelt | Publicerer siderne i `wiki/` til repositoryets wiki |
|
||||||
| Quality checks | [`quality-checks.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks.yml) | Genbrugeligt (`workflow_call`) | et kald fra et andet repository | Kører ruff, mypy, shellcheck og shfmt på de sporede filer og ændrer intet |
|
| Quality checks | [`quality-checks.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks.yml) | Genbrugeligt (`workflow_call`) | et kald fra et andet repository | Kører ruff, mypy, shellcheck og shfmt på de sporede filer og ændrer intet |
|
||||||
| Release | [`release.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/release.yml) | Kun dette repository | manuelt | Opretter versionstagget, udgivelsessiden og major-tagget efter kontrollerne |
|
| Release | [`release.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/release.yml) | Kun dette repository | manuelt | Opretter versionstagget, udgivelsessiden og major-tagget efter kontrollerne |
|
||||||
|
| Publicering af accepterede milepæle | [`sync-milestones.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/sync-milestones.yml) | Kun dette repository | push til `main`, der ændrer `docs/milestones/**` eller `docs/sqa/reviews/**`, manuelt (tørkørsel som standard) | Opretter eller opdaterer Gitea-milepælen og issues for hver milepæl, der er Accepted med en Go-gennemgang |
|
||||||
| Validate workflows | [`validate-workflows.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/validate-workflows.yml) | Kun dette repository | pull request, push til `main`, manuelt | Læser hvert workflow som YAML og kører offline-testene |
|
| Validate workflows | [`validate-workflows.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/validate-workflows.yml) | Kun dette repository | pull request, push til `main`, manuelt | Læser hvert workflow som YAML og kører offline-testene |
|
||||||
|
|
||||||
### Synkronisering af GitHub-metadata
|
### Synkronisering af GitHub-metadata
|
||||||
@@ -233,6 +234,54 @@ deactivate Workflow
|
|||||||
@enduml
|
@enduml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Publicering af accepterede milepæle
|
||||||
|
|
||||||
|
Permanent tilladelse til at publicere: ved et push til `main`, der ændrer milepælene eller deres gennemgange, oprettes eller opdateres hver milepæl, hvis seneste række i Version History er Accepted, og hvis seneste gennemgang er en Go, på Gitea med sine opgaver som issues. Intet lukkes eller slettes. En manuel kørsel er en tørkørsel, medmindre `dry_run` slås fra. Det bruger secret'en `TOKEN_FOR_GITEA` og `--accepted-only`-reglen i det monterede framework (v0.5.0 eller nyere).
|
||||||
|
|
||||||
|
#### Workflow
|
||||||
|
|
||||||
|
```plantuml
|
||||||
|
@startuml
|
||||||
|
title Publish accepted milestones (this repository)
|
||||||
|
|
||||||
|
autonumber
|
||||||
|
|
||||||
|
actor "Push to main that changes\ndocs/milestones/** or docs/sqa/reviews/**,\nor manual trigger" as Trigger
|
||||||
|
participant "Gitea Actions\nsync-milestones" as Workflow
|
||||||
|
participant "framework/scripts/\nsync-project.sh" as Script
|
||||||
|
participant "Gitea REST API" as Gitea
|
||||||
|
|
||||||
|
Trigger -> Workflow: Start workflow
|
||||||
|
activate Workflow
|
||||||
|
Workflow -> Workflow: Check out the project and the framework\nsubmodules over HTTPS with TOKEN_FOR_GITEA
|
||||||
|
Workflow -> Script: --accepted-only (dry run)\nor --accepted-only --apply
|
||||||
|
activate Script
|
||||||
|
|
||||||
|
loop for each docs/milestones/mil-*.md
|
||||||
|
alt latest Version History row is not Accepted,\nor the latest review record is not a Go
|
||||||
|
Script -> Script: Skip with the reason on stderr
|
||||||
|
else
|
||||||
|
alt dry run
|
||||||
|
Script -> Script: Print the plan, no network call
|
||||||
|
else
|
||||||
|
Script -> Gitea: Create or update the Milestone\nand one Issue per task row
|
||||||
|
Gitea --> Script: Milestone and issue numbers
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
note right of Script
|
||||||
|
Nothing is closed or deleted.
|
||||||
|
Each real run edits the issues
|
||||||
|
of every accepted milestone.
|
||||||
|
end note
|
||||||
|
Script --> Workflow: Done, or "nothing to publish"
|
||||||
|
deactivate Script
|
||||||
|
Workflow --> Trigger: Workflow result
|
||||||
|
deactivate Workflow
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
### Validering af workflows
|
### Validering af workflows
|
||||||
|
|
||||||
Repositoryets egen validering: de offline-tests, der er en betingelse for hver pull request.
|
Repositoryets egen validering: de offline-tests, der er en betingelse for hver pull request.
|
||||||
|
|||||||
+51
-2
@@ -13,12 +13,12 @@ A collection of reusable Gitea Actions workflows for DevOps professionals and so
|
|||||||
|
|
||||||
This repository is the central collection of reusable automation for TirSystem repositories. The primary repository lives at `git.tirsystem.com` (Gitea) and is push-mirrored to GitHub.
|
This repository is the central collection of reusable automation for TirSystem repositories. The primary repository lives at `git.tirsystem.com` (Gitea) and is push-mirrored to GitHub.
|
||||||
|
|
||||||
It contains five workflows: metadata sync to the GitHub mirror, wiki publishing, shared quality checks, a release workflow and the repository's own validation. They are listed with their purpose and a diagram under [Workflows](#workflows).
|
It contains six workflows: metadata sync to the GitHub mirror, wiki publishing, shared quality checks, a release workflow, the publishing of accepted milestones and the repository's own validation. They are listed with their purpose and a diagram under [Workflows](#workflows).
|
||||||
|
|
||||||
|
|
||||||
## Workflows
|
## Workflows
|
||||||
|
|
||||||
Five workflows live in this repository. A **scoped** workflow is delivered by the instance to every repository of the TirSystem organizations and needs nothing in the repository; a **reusable** workflow is called by a repository with `uses:`; the others run only here. The diagrams are PlantUML source.
|
Six workflows live in this repository. A **scoped** workflow is delivered by the instance to every repository of the TirSystem organizations and needs nothing in the repository; a **reusable** workflow is called by a repository with `uses:`; the others run only here. The diagrams are PlantUML source.
|
||||||
|
|
||||||
| Workflow | File | Kind | Starts on | Purpose |
|
| Workflow | File | Kind | Starts on | Purpose |
|
||||||
| --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- |
|
||||||
@@ -26,6 +26,7 @@ Five workflows live in this repository. A **scoped** workflow is delivered by th
|
|||||||
| Publish wiki | [`publish-wiki.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/scoped_workflows/publish-wiki.yml) | Scoped, opt-in with `wiki/.publish` | push to `main` that changes `wiki/**`, manual | Publishes the pages in `wiki/` to the repository wiki |
|
| Publish wiki | [`publish-wiki.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/scoped_workflows/publish-wiki.yml) | Scoped, opt-in with `wiki/.publish` | push to `main` that changes `wiki/**`, manual | Publishes the pages in `wiki/` to the repository wiki |
|
||||||
| Quality checks | [`quality-checks.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks.yml) | Reusable (`workflow_call`) | a call from another repository | Runs ruff, mypy, shellcheck and shfmt on the tracked files and changes nothing |
|
| Quality checks | [`quality-checks.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks.yml) | Reusable (`workflow_call`) | a call from another repository | Runs ruff, mypy, shellcheck and shfmt on the tracked files and changes nothing |
|
||||||
| Release | [`release.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/release.yml) | This repository only | manual | Creates the version tag, the release page and the major tag after the checks |
|
| Release | [`release.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/release.yml) | This repository only | manual | Creates the version tag, the release page and the major tag after the checks |
|
||||||
|
| Publish accepted milestones | [`sync-milestones.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/sync-milestones.yml) | This repository only | push to `main` that changes `docs/milestones/**` or `docs/sqa/reviews/**`, manual (dry run by default) | Creates or updates the Gitea milestone and issues of every milestone that is Accepted with a Go review |
|
||||||
| Validate workflows | [`validate-workflows.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/validate-workflows.yml) | This repository only | pull request, push to `main`, manual | Parses every workflow and runs the offline tests |
|
| Validate workflows | [`validate-workflows.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/validate-workflows.yml) | This repository only | pull request, push to `main`, manual | Parses every workflow and runs the offline tests |
|
||||||
|
|
||||||
### Sync GitHub metadata
|
### Sync GitHub metadata
|
||||||
@@ -233,6 +234,54 @@ deactivate Workflow
|
|||||||
@enduml
|
@enduml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Publish accepted milestones
|
||||||
|
|
||||||
|
Standing authorization to publish: on a push to `main` that changes the milestones or their reviews, every milestone whose latest Version History row is Accepted and whose latest review is a Go is created or updated on Gitea with its tasks as issues. Nothing is closed or deleted. A manual run is a dry run unless `dry_run` is switched off. It uses the secret `TOKEN_FOR_GITEA` and the `--accepted-only` rule of the mounted framework (v0.5.0 or later).
|
||||||
|
|
||||||
|
#### Workflow
|
||||||
|
|
||||||
|
```plantuml
|
||||||
|
@startuml
|
||||||
|
title Publish accepted milestones (this repository)
|
||||||
|
|
||||||
|
autonumber
|
||||||
|
|
||||||
|
actor "Push to main that changes\ndocs/milestones/** or docs/sqa/reviews/**,\nor manual trigger" as Trigger
|
||||||
|
participant "Gitea Actions\nsync-milestones" as Workflow
|
||||||
|
participant "framework/scripts/\nsync-project.sh" as Script
|
||||||
|
participant "Gitea REST API" as Gitea
|
||||||
|
|
||||||
|
Trigger -> Workflow: Start workflow
|
||||||
|
activate Workflow
|
||||||
|
Workflow -> Workflow: Check out the project and the framework\nsubmodules over HTTPS with TOKEN_FOR_GITEA
|
||||||
|
Workflow -> Script: --accepted-only (dry run)\nor --accepted-only --apply
|
||||||
|
activate Script
|
||||||
|
|
||||||
|
loop for each docs/milestones/mil-*.md
|
||||||
|
alt latest Version History row is not Accepted,\nor the latest review record is not a Go
|
||||||
|
Script -> Script: Skip with the reason on stderr
|
||||||
|
else
|
||||||
|
alt dry run
|
||||||
|
Script -> Script: Print the plan, no network call
|
||||||
|
else
|
||||||
|
Script -> Gitea: Create or update the Milestone\nand one Issue per task row
|
||||||
|
Gitea --> Script: Milestone and issue numbers
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
note right of Script
|
||||||
|
Nothing is closed or deleted.
|
||||||
|
Each real run edits the issues
|
||||||
|
of every accepted milestone.
|
||||||
|
end note
|
||||||
|
Script --> Workflow: Done, or "nothing to publish"
|
||||||
|
deactivate Script
|
||||||
|
Workflow --> Trigger: Workflow result
|
||||||
|
deactivate Workflow
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
### Validate workflows
|
### Validate workflows
|
||||||
|
|
||||||
The repository's own validation: the offline tests that gate every pull request.
|
The repository's own validation: the offline tests that gate every pull request.
|
||||||
|
|||||||
+52
-3
@@ -1,4 +1,4 @@
|
|||||||
<!-- translation of Home.md, source sha256 510b243ec5f2 -->
|
<!-- translation of Home.md, source sha256 c9c04abaf4ae -->
|
||||||
|
|
||||||
> Ini ialah terjemahan [`Home`](Home). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
> Ini ialah terjemahan [`Home`](Home). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
||||||
|
|
||||||
@@ -13,12 +13,12 @@ Koleksi aliran kerja (workflow) Gitea Actions yang boleh digunakan semula untuk
|
|||||||
|
|
||||||
Repositori ini ialah koleksi pusat bagi automasi yang boleh digunakan semula untuk repositori TirSystem. Repositori utama berada di `git.tirsystem.com` (Gitea) dan dicerminkan dengan push ke GitHub.
|
Repositori ini ialah koleksi pusat bagi automasi yang boleh digunakan semula untuk repositori TirSystem. Repositori utama berada di `git.tirsystem.com` (Gitea) dan dicerminkan dengan push ke GitHub.
|
||||||
|
|
||||||
Ia mengandungi lima aliran kerja: penyegerakan metadata ke cermin GitHub, penerbitan wiki, semakan kualiti bersama, aliran kerja keluaran dan pengesahan repositori sendiri. Ia disenaraikan dengan tujuan dan rajah di bawah [Aliran kerja](#aliran-kerja).
|
Ia mengandungi enam aliran kerja: penyegerakan metadata ke cermin GitHub, penerbitan wiki, semakan kualiti bersama, aliran kerja keluaran, penerbitan pencapaian (milestone) yang diterima dan pengesahan repositori sendiri. Ia disenaraikan dengan tujuan dan rajah di bawah [Aliran kerja](#aliran-kerja).
|
||||||
|
|
||||||
|
|
||||||
## Aliran kerja
|
## Aliran kerja
|
||||||
|
|
||||||
Terdapat lima aliran kerja dalam repositori ini. Aliran kerja **scoped** dihantar oleh instans ke setiap repositori organisasi TirSystem dan tidak memerlukan apa-apa dalam repositori; aliran kerja **boleh guna semula** dipanggil oleh sebuah repositori dengan `uses:`; yang lain hanya berjalan di sini. Rajah ialah kod sumber PlantUML dan dalam bahasa Inggeris.
|
Terdapat enam aliran kerja dalam repositori ini. Aliran kerja **scoped** dihantar oleh instans ke setiap repositori organisasi TirSystem dan tidak memerlukan apa-apa dalam repositori; aliran kerja **boleh guna semula** dipanggil oleh sebuah repositori dengan `uses:`; yang lain hanya berjalan di sini. Rajah ialah kod sumber PlantUML dan dalam bahasa Inggeris.
|
||||||
|
|
||||||
| Aliran kerja | Fail | Jenis | Bermula apabila | Tujuan |
|
| Aliran kerja | Fail | Jenis | Bermula apabila | Tujuan |
|
||||||
| --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- |
|
||||||
@@ -26,6 +26,7 @@ Terdapat lima aliran kerja dalam repositori ini. Aliran kerja **scoped** dihanta
|
|||||||
| Publish wiki | [`publish-wiki.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/scoped_workflows/publish-wiki.yml) | Scoped, pilih menyertai dengan `wiki/.publish` | push ke `main` yang mengubah `wiki/**`, manual | Menerbitkan halaman dalam `wiki/` ke wiki repositori |
|
| Publish wiki | [`publish-wiki.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/scoped_workflows/publish-wiki.yml) | Scoped, pilih menyertai dengan `wiki/.publish` | push ke `main` yang mengubah `wiki/**`, manual | Menerbitkan halaman dalam `wiki/` ke wiki repositori |
|
||||||
| Quality checks | [`quality-checks.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks.yml) | Boleh guna semula (`workflow_call`) | panggilan daripada repositori lain | Menjalankan ruff, mypy, shellcheck dan shfmt pada fail yang dijejaki dan tidak mengubah apa-apa |
|
| Quality checks | [`quality-checks.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/quality-checks.yml) | Boleh guna semula (`workflow_call`) | panggilan daripada repositori lain | Menjalankan ruff, mypy, shellcheck dan shfmt pada fail yang dijejaki dan tidak mengubah apa-apa |
|
||||||
| Release | [`release.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/release.yml) | Repositori ini sahaja | manual | Mencipta tag versi, halaman keluaran dan tag major selepas semakan |
|
| Release | [`release.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/release.yml) | Repositori ini sahaja | manual | Mencipta tag versi, halaman keluaran dan tag major selepas semakan |
|
||||||
|
| Menerbitkan milestone yang diterima | [`sync-milestones.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/sync-milestones.yml) | Repositori ini sahaja | push ke `main` yang mengubah `docs/milestones/**` atau `docs/sqa/reviews/**`, manual (larian percubaan secara lalai) | Mencipta atau mengemas kini milestone Gitea dan isu bagi setiap milestone yang Accepted dengan semakan Go |
|
||||||
| Validate workflows | [`validate-workflows.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/validate-workflows.yml) | Repositori ini sahaja | pull request, push ke `main`, manual | Menghurai setiap aliran kerja sebagai YAML dan menjalankan ujian luar talian |
|
| Validate workflows | [`validate-workflows.yml`](https://git.tirsystem.com/TirSystem/github-action/src/branch/main/.gitea/workflows/validate-workflows.yml) | Repositori ini sahaja | pull request, push ke `main`, manual | Menghurai setiap aliran kerja sebagai YAML dan menjalankan ujian luar talian |
|
||||||
|
|
||||||
### Menyegerakkan metadata GitHub
|
### Menyegerakkan metadata GitHub
|
||||||
@@ -233,6 +234,54 @@ deactivate Workflow
|
|||||||
@enduml
|
@enduml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Menerbitkan milestone yang diterima
|
||||||
|
|
||||||
|
Kebenaran tetap untuk menerbitkan: pada push ke `main` yang mengubah milestone atau semakannya, setiap milestone yang baris terkini Version History-nya Accepted dan semakan terkininya Go dicipta atau dikemas kini di Gitea dengan tugasnya sebagai isu. Tiada apa-apa ditutup atau dipadam. Larian manual ialah larian percubaan kecuali `dry_run` dimatikan. Ia menggunakan secret `TOKEN_FOR_GITEA` dan peraturan `--accepted-only` framework yang dipasang (v0.5.0 atau lebih baharu).
|
||||||
|
|
||||||
|
#### Aliran kerja
|
||||||
|
|
||||||
|
```plantuml
|
||||||
|
@startuml
|
||||||
|
title Publish accepted milestones (this repository)
|
||||||
|
|
||||||
|
autonumber
|
||||||
|
|
||||||
|
actor "Push to main that changes\ndocs/milestones/** or docs/sqa/reviews/**,\nor manual trigger" as Trigger
|
||||||
|
participant "Gitea Actions\nsync-milestones" as Workflow
|
||||||
|
participant "framework/scripts/\nsync-project.sh" as Script
|
||||||
|
participant "Gitea REST API" as Gitea
|
||||||
|
|
||||||
|
Trigger -> Workflow: Start workflow
|
||||||
|
activate Workflow
|
||||||
|
Workflow -> Workflow: Check out the project and the framework\nsubmodules over HTTPS with TOKEN_FOR_GITEA
|
||||||
|
Workflow -> Script: --accepted-only (dry run)\nor --accepted-only --apply
|
||||||
|
activate Script
|
||||||
|
|
||||||
|
loop for each docs/milestones/mil-*.md
|
||||||
|
alt latest Version History row is not Accepted,\nor the latest review record is not a Go
|
||||||
|
Script -> Script: Skip with the reason on stderr
|
||||||
|
else
|
||||||
|
alt dry run
|
||||||
|
Script -> Script: Print the plan, no network call
|
||||||
|
else
|
||||||
|
Script -> Gitea: Create or update the Milestone\nand one Issue per task row
|
||||||
|
Gitea --> Script: Milestone and issue numbers
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
note right of Script
|
||||||
|
Nothing is closed or deleted.
|
||||||
|
Each real run edits the issues
|
||||||
|
of every accepted milestone.
|
||||||
|
end note
|
||||||
|
Script --> Workflow: Done, or "nothing to publish"
|
||||||
|
deactivate Script
|
||||||
|
Workflow --> Trigger: Workflow result
|
||||||
|
deactivate Workflow
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
### Mengesahkan aliran kerja
|
### Mengesahkan aliran kerja
|
||||||
|
|
||||||
Pengesahan repositori sendiri: ujian luar talian yang menjadi syarat bagi setiap pull request.
|
Pengesahan repositori sendiri: ujian luar talian yang menjadi syarat bagi setiap pull request.
|
||||||
|
|||||||
Reference in New Issue
Block a user