From 202820207d90a8d5676bffcaa2c30c0678e929e3 Mon Sep 17 00:00:00 2001 From: Andrew Ghostuhin Date: Mon, 14 Jul 2025 21:51:51 +0300 Subject: [PATCH 1/7] fix(actions): sync inputs --- .github/actions/github/commit/create/action.yml | 2 +- .github/actions/release/prepare-pr/action.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/github/commit/create/action.yml b/.github/actions/github/commit/create/action.yml index 5c2848ba..62d3c340 100644 --- a/.github/actions/github/commit/create/action.yml +++ b/.github/actions/github/commit/create/action.yml @@ -23,7 +23,7 @@ inputs: filePattern: description: File pattern used for `git add`. For example `src/*.js` required: false - default: '.' + default: 'version.properties' runs: using: composite diff --git a/.github/actions/release/prepare-pr/action.yml b/.github/actions/release/prepare-pr/action.yml index 08aff2fb..295936ec 100644 --- a/.github/actions/release/prepare-pr/action.yml +++ b/.github/actions/release/prepare-pr/action.yml @@ -43,6 +43,7 @@ runs: branchName: ${{ steps.createReleaseBranchStep.outputs.branchName }} githubToken: ${{ inputs.githubToken }} targetRepository: ${{ github.repository }} + filePattern: 'version.properties' - uses: rees46/workflow/.github/actions/git/wait-available-branch@master with: From dd72fb5206015389f14528521e77e5b8ed96bedd Mon Sep 17 00:00:00 2001 From: Andrew Ghostuhin Date: Fri, 18 Jul 2025 02:42:25 +0300 Subject: [PATCH 2/7] fix(actions): typos --- .github/actions/git/add/action.yml | 2 +- .github/actions/git/find-last-tag-commit/action.yml | 4 ++-- .github/actions/github/commit/create/action.yml | 2 +- .github/actions/github/pull-request/create/action.yml | 6 +++--- .../github/pull-request/get-last-author/action.yml | 8 ++++---- .github/actions/github/push/create/action.yml | 4 ++-- .github/actions/ios/prepare-publish/action.yml | 2 +- .github/actions/publish/prepare-testflight/action.yml | 2 +- .github/actions/sync/prepare/action.yml | 4 ++-- .github/actions/utils/check-vars/action.yml | 4 ++-- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/actions/git/add/action.yml b/.github/actions/git/add/action.yml index 1a10aef3..172b7201 100644 --- a/.github/actions/git/add/action.yml +++ b/.github/actions/git/add/action.yml @@ -3,7 +3,7 @@ description: create commit inputs: excludeTmp: - description: Esclude tmp dir - boolean + description: Exclude tmp dir - boolean required: false default: '' workingDirectory: diff --git a/.github/actions/git/find-last-tag-commit/action.yml b/.github/actions/git/find-last-tag-commit/action.yml index 69bc6e24..1b1608a4 100644 --- a/.github/actions/git/find-last-tag-commit/action.yml +++ b/.github/actions/git/find-last-tag-commit/action.yml @@ -1,5 +1,5 @@ -name: Find last tag commin -description: Find las tag and return this commit hash +name: Find last tag commit +description: Find last tag and return this commit hash outputs: lastTagCommit: diff --git a/.github/actions/github/commit/create/action.yml b/.github/actions/github/commit/create/action.yml index 62d3c340..6ae64dd2 100644 --- a/.github/actions/github/commit/create/action.yml +++ b/.github/actions/github/commit/create/action.yml @@ -11,7 +11,7 @@ inputs: required: false default: ${{ github.repository }} githubToken: - description: GitHup token + description: GitHub token required: true branchName: description: Branch to commit diff --git a/.github/actions/github/pull-request/create/action.yml b/.github/actions/github/pull-request/create/action.yml index 8823bb3d..b8368410 100644 --- a/.github/actions/github/pull-request/create/action.yml +++ b/.github/actions/github/pull-request/create/action.yml @@ -4,10 +4,10 @@ description: create pull request on target repo inputs: targetDirectory: default: tmp/target - description: Commit author GitGup token + description: Commit author GitHub token required: true githubToken: - description: GitHup token + description: GitHub token required: true prTitle: description: PullRequest title @@ -33,7 +33,7 @@ inputs: description: git branch name required: true targetRepository: - description: pull reques target repository + description: pull request target repository required: false runs: diff --git a/.github/actions/github/pull-request/get-last-author/action.yml b/.github/actions/github/pull-request/get-last-author/action.yml index a93d1b78..8c889a0e 100644 --- a/.github/actions/github/pull-request/get-last-author/action.yml +++ b/.github/actions/github/pull-request/get-last-author/action.yml @@ -1,9 +1,9 @@ -name: Get last merget PullRequest author -description: get last merget pull request author +name: Get last merged PullRequest author +description: get last merged pull request author inputs: githubToken: - description: GitHup token + description: GitHub token required: true reviewerUsername: description: github pull request reviewer username @@ -11,7 +11,7 @@ inputs: outputs: lastPrAuthor: - description: Get branch name + description: last pull request author value: ${{ steps.pr_author.outputs.lastPrAuthor }} runs: diff --git a/.github/actions/github/push/create/action.yml b/.github/actions/github/push/create/action.yml index 0b83944f..143b2102 100644 --- a/.github/actions/github/push/create/action.yml +++ b/.github/actions/github/push/create/action.yml @@ -1,5 +1,5 @@ name: Git push -description: gith push +description: git push inputs: targetDirectory: @@ -7,7 +7,7 @@ inputs: description: TargetDirectory required: true githubToken: - description: GitHup token + description: GitHub token required: true branchName: description: branchName diff --git a/.github/actions/ios/prepare-publish/action.yml b/.github/actions/ios/prepare-publish/action.yml index 30aa63d1..851d9197 100644 --- a/.github/actions/ios/prepare-publish/action.yml +++ b/.github/actions/ios/prepare-publish/action.yml @@ -1,4 +1,4 @@ -name: prepare ios enveronment to publish on testflight +name: prepare ios environment to publish on testflight description: install certificate, provisioning profile & p8 key inputs: diff --git a/.github/actions/publish/prepare-testflight/action.yml b/.github/actions/publish/prepare-testflight/action.yml index 6dbc9469..aa0fbdd4 100644 --- a/.github/actions/publish/prepare-testflight/action.yml +++ b/.github/actions/publish/prepare-testflight/action.yml @@ -1,5 +1,5 @@ name: prepare testflight publish action -description: checout to source, target and workflow repo, prepare nodejs enveronment and install dependencies; github app token on output +description: checkout to source, target and workflow repo, prepare nodejs environment and install dependencies; github app token on output inputs: workflowRepo: diff --git a/.github/actions/sync/prepare/action.yml b/.github/actions/sync/prepare/action.yml index 96719246..d9206c20 100644 --- a/.github/actions/sync/prepare/action.yml +++ b/.github/actions/sync/prepare/action.yml @@ -1,5 +1,5 @@ -name: reusable repo sync workflow prepare enveronment -description: checout to source, target and workflow repo, prepare nodejs enveronment and install dependencies; github app token on output +name: reusable repo sync workflow prepare environment +description: checkout to source, target and workflow repo, prepare nodejs environment and install dependencies; github app token on output inputs: appId: diff --git a/.github/actions/utils/check-vars/action.yml b/.github/actions/utils/check-vars/action.yml index c552ca18..c894c0bf 100644 --- a/.github/actions/utils/check-vars/action.yml +++ b/.github/actions/utils/check-vars/action.yml @@ -1,5 +1,5 @@ name: Check variables -description: chech variables for prepare publish enveronment; needs checkouted workflow repo +description: check variables for prepare publish environment; needs checked out workflow repo inputs: workflowDirectory: @@ -10,7 +10,7 @@ inputs: description: variables to check in json format required: true requiredVars: - description: list of required variables, devided by `,` + description: list of required variables, divided by `,` runs: using: composite From 01f9e040bdc7201a990acbcd52c231ede17f0c7b Mon Sep 17 00:00:00 2001 From: Andrew Ghostuhin Date: Fri, 18 Jul 2025 02:44:14 +0300 Subject: [PATCH 3/7] perf(workflows): remove bak --- .github/workflows/auto-merge-sync-pr.yml.bak | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 .github/workflows/auto-merge-sync-pr.yml.bak diff --git a/.github/workflows/auto-merge-sync-pr.yml.bak b/.github/workflows/auto-merge-sync-pr.yml.bak deleted file mode 100644 index 38e7473e..00000000 --- a/.github/workflows/auto-merge-sync-pr.yml.bak +++ /dev/null @@ -1,18 +0,0 @@ -name: Auto Merge Release PRs - -on: - pull_request: - types: [opened, synchronize] - branches: - - master - paths-ignore: - - ".github/**" - -jobs: - auto-merge: - if: startsWith(github.head_ref, 'sync/') - uses: rees46/workflow/.github/workflows/reusable-auto-merge-pr.yaml@master - secrets: - appSecret: ${{ secrets.VERSIONER_SECRET }} - with: - appId: ${{ vars.VERSIONER_ID }} From 64d2f046c7182b7964070e645e7389bfe5213790 Mon Sep 17 00:00:00 2001 From: Andrew Ghostuhin Date: Fri, 18 Jul 2025 02:59:11 +0300 Subject: [PATCH 4/7] feat(workflows): lint --- .github/workflows/lint.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/lint.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 00000000..b2c4eb13 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,28 @@ +name: YAML and Actionlint + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Run yamllint + uses: ibiqlik/action-yamllint@v3 + with: + file_or_dir: ".github/**/*.y*ml" + format: 'colored' + + - name: Run actionlint + uses: docker://rhysd/actionlint:latest + with: + args: -color From 8c0066dedb0cf269b4624cf7e72f18df31ddd00a Mon Sep 17 00:00:00 2001 From: Andrew Ghostuhin Date: Fri, 18 Jul 2025 03:07:25 +0300 Subject: [PATCH 5/7] docs: init --- README.md | 665 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 665 insertions(+) diff --git a/README.md b/README.md index 5017471a..1de533ca 100644 --- a/README.md +++ b/README.md @@ -1 +1,666 @@ # REES46 reusable Github Workflows + +## [`deploy-node-trigger.yaml`](.github/workflows/deploy-node-trigger.yaml) + +Deploy nodejs services + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/deploy-node-trigger.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ------------------- | -------- | ------- | ------------------ | +| `job_name` | yes | `` | Jenkins job name | +| `image_tag` | yes | `` | Docker image tag | +| `git_branch_name` | yes | `` | Git branch name | +| `git_commit` | yes | `` | Git commit hash | +| `git_commit_msg` | yes | `` | Git commit message | +| `git_commit_author` | yes | `` | Git commit author | +| `git_commit_url` | yes | `` | Git commit url | + +## [`deploy-node.yaml`](.github/workflows/deploy-node.yaml) + +Deploy NodeJS services + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/deploy-node.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ------------------ | -------- | ------- | -------------------------------------------- | +| `changeLookUpPath` | no | `` | Which service to look for changes and deploy | +| `branch` | yes | `` | Git branch name | + +## [`deploy-php.yaml`](.github/workflows/deploy-php.yaml) + +Deploy PHP services + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/deploy-php.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ------------------ | -------- | ------- | -------------------------------------------- | +| `changeLookUpPath` | no | `` | Which service to look for changes and deploy | +| `branch` | yes | `` | Git branch name | + +## [`deploy-ruby.yaml`](.github/workflows/deploy-ruby.yaml) + +Deploy Ruby services + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/deploy-ruby.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ------------- | -------- | ------- | ------------------ | +| `branch` | yes | `` | Git branch name | +| `job_name` | yes | `` | Jenkins job name | +| `commit_hash` | yes | `` | Github commit hash | + +## [`docker-publish.yaml`](.github/workflows/docker-publish.yaml) + +Reusable docker publish + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/docker-publish.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ------------- | -------- | ------- | ------------------------------ | +| `packageName` | no | `` | Name of the package to publish | + +## [`repo-sync.yaml`](.github/workflows/repo-sync.yaml) + +Repository synchronization + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/repo-sync.yaml@master + with: + # ... +``` + +## [`reusable-android-checks.yaml`](.github/workflows/reusable-android-checks.yaml) + +Reusable Android SDK publish to Sona + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-android-checks.yaml@master + with: + # ... +``` + +| name | required | default | description | +| --------------------------------------- | -------- | ----------------------- | ----------------------------------------- | +| `PROPERTIES_FILE` | no | `gradle.properties` | Relative file path for putting in secrets | +| `SIGNING_SECRET_KEY_RING_FILE` | no | `com.rees46.key.gpg` | Location and name for signature file | +| `SIGNING_SECRET_KEY_RING_FILE_LOCATION` | yes | `./personalization-sdk` | Location and name for signature file | +| `GOOGLE_SERVICES_FILE_LOCATION` | no | `sample` | Location for google services file | +| `GOOGLE_SERVICES_FILE_NAME` | no | `google-services.json` | Name for google services file | +| `GRADLE_VERSION` | no | `` | | +| `VARIANT_NAME` | yes | `` | REES46 or PersonaClick | +| `URL` | yes | `` | GitHub repo URL | +| `MAVEN_REPOSITORY_URL` | yes | `` | Maven repository publish to | +| `OSSRH_USERNAME` | no | `github-bot@rees46.com` | | + +## [`reusable-android-google-play-publish.yaml`](.github/workflows/reusable-android-google-play-publish.yaml) + +Reusable Android Demo Shop Publish + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-android-google-play-publish.yaml@master + with: + # ... +``` + +| name | required | default | description | +| -------------------- | -------- | ------- | ----------- | +| `githubAppId` | yes | `` | | +| `packageName` | yes | `` | | +| `aabReleasePath` | yes | `` | | +| `propertiesFilePath` | yes | `` | | + +## [`reusable-android-publish.yaml`](.github/workflows/reusable-android-publish.yaml) + +Reusable Android SDK publish to Sona + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-android-publish.yaml@master + with: + # ... +``` + +| name | required | default | description | +| --------------------------------------- | -------- | ----------------------- | ----------------------------------------- | +| `appId` | yes | `` | App ID for committing and pushing | +| `PROPERTIES_FILE` | no | `gradle.properties` | Relative file path for putting in secrets | +| `SIGNING_SECRET_KEY_RING_FILE` | no | `com.rees46.key.gpg` | Location and name for signature file | +| `SIGNING_SECRET_KEY_RING_FILE_LOCATION` | no | `./personalization-sdk` | Location and name for signature file | +| `GRADLE_VERSION` | no | `` | | +| `VARIANT_NAME` | yes | `` | REES46 or PersonaClick | +| `URL` | yes | `` | GitHub repo URL | +| `MAVEN_REPOSITORY_URL` | yes | `` | Maven repository publish to | +| `OSSRH_USERNAME` | no | `github-bot@rees46.com` | | + +## [`reusable-android-release-apk.yaml`](.github/workflows/reusable-android-release-apk.yaml) + +Reusable Android SDK publish to Sona + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-android-release-apk.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ------- | -------- | ------- | --------------------------------- | +| `appId` | yes | `` | App ID for committing and pushing | + +## [`reusable-auto-merge-pr.yaml`](.github/workflows/reusable-auto-merge-pr.yaml) + +Reusable Ruby publish migrated DB + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-auto-merge-pr.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ------- | -------- | ------- | -------------------------------- | +| `appId` | yes | `` | App token for committing changes | + +## [`reusable-deploy-docker.yaml`](.github/workflows/reusable-deploy-docker.yaml) + +Start Jenkins + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-deploy-docker.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ---------- | -------- | ------- | ---------------- | +| `branch` | no | `` | Git branch name | +| `packages` | yes | `` | List of packages | +| `tag` | no | `` | Docker image tag | + +## [`reusable-docker-publish-infrastructure.yaml`](.github/workflows/reusable-docker-publish-infrastructure.yaml) + +Build and Publish Docker Images + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-docker-publish-infrastructure.yaml@master + with: + # ... +``` + +## [`reusable-docker-publish.yaml`](.github/workflows/reusable-docker-publish.yaml) + +Reusable docker publish + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-docker-publish.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ------------------ | -------- | ------- | ----------------------------------------------------------------------- | +| `node-version` | no | `18` | Node version to run this workflow. Default: 18 as it is in action cache | +| `changeLookUpPath` | no | `` | Which folder to look for changes and publish | +| `branch` | yes | `` | Git branch name | + +## [`reusable-infrastructure-checks-ansible.yaml`](.github/workflows/reusable-infrastructure-checks-ansible.yaml) + +Reusable infrastructure checks ansible + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-infrastructure-checks-ansible.yaml@master + with: + # ... +``` + +| name | required | default | description | +| -------------- | -------- | --------- | ----------- | +| `ANSIBLE_PATH` | no | `ansible` | | + +## [`reusable-infrastructure-checks-elasticsearch.yaml`](.github/workflows/reusable-infrastructure-checks-elasticsearch.yaml) + +Reusable infrastructure checks elasticsearch + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-infrastructure-checks-elasticsearch.yaml@master + with: + # ... +``` + +## [`reusable-infrastructure-checks-haproxy.yaml`](.github/workflows/reusable-infrastructure-checks-haproxy.yaml) + +Reusable infrastructure checks HAProxy + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-infrastructure-checks-haproxy.yaml@master + with: + # ... +``` + +## [`reusable-infrastructure-checks-k8s.yaml`](.github/workflows/reusable-infrastructure-checks-k8s.yaml) + +Reusable infrastructure checks k8s + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-infrastructure-checks-k8s.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ------ | -------- | ------- | ----------- | +| `PATH` | yes | `specs` | | + +## [`reusable-infrastructure-checks-nginx.yaml`](.github/workflows/reusable-infrastructure-checks-nginx.yaml) + +Reusable infrastructure checks NGINX + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-infrastructure-checks-nginx.yaml@master + with: + # ... +``` + +## [`reusable-infrastructure-checks-pgbouncer.yaml`](.github/workflows/reusable-infrastructure-checks-pgbouncer.yaml) + +Reusable infrastructure checks PGBouncer + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-infrastructure-checks-pgbouncer.yaml@master + with: + # ... +``` + +## [`reusable-infrastructure-manual-ansible-check.yaml`](.github/workflows/reusable-infrastructure-manual-ansible-check.yaml) + +Reusable Ansible playbook dry-run + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-infrastructure-manual-ansible-check.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ---------------- | -------- | ------- | ----------- | +| `PLAYBOOK_NAME` | yes | `` | | +| `FOLDER` | yes | `` | | +| `PLAYBOOKS_PATH` | yes | `` | | + +## [`reusable-infrastructure-manual-ansible-run.yaml`](.github/workflows/reusable-infrastructure-manual-ansible-run.yaml) + +Reusable Ansible playbook run + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-infrastructure-manual-ansible-run.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ---------------- | -------- | ------- | ----------- | +| `PLAYBOOK_NAME` | yes | `` | | +| `FOLDER` | yes | `` | | +| `PLAYBOOKS_PATH` | yes | `` | | + +## [`reusable-ios-checks.yaml`](.github/workflows/reusable-ios-checks.yaml) + +iOS checks + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-ios-checks.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ---------------------------- | -------- | ---------------------------------------- | ----------- | +| `googleServicesFileLocation` | no | `./DemoApp/REES46Demo/Supporting Files/` | | +| `googleServicesFileName` | no | `GoogleService-Info.plist` | | + +## [`reusable-ios-publish.yaml`](.github/workflows/reusable-ios-publish.yaml) + +iOS publish Swift pacakge and Cocoapods + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-ios-publish.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ------- | -------- | ------- | -------------------------------- | +| `appId` | yes | `` | App token for committing changes | + +## [`reusable-ios-release.yaml`](.github/workflows/reusable-ios-release.yaml) + +iOS create release + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-ios-release.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ----------------- | -------- | ---------------- | -------------------------------- | +| `podSpecFilePath` | no | `REES46.podspec` | File path to podspec file | +| `appId` | yes | `` | App token for committing changes | + +## [`reusable-ios-testflight-publish.yaml`](.github/workflows/reusable-ios-testflight-publish.yaml) + +Reusable iOS TestFlight Publish + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-ios-testflight-publish.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ------------------------------ | -------- | ------- | ----------- | +| `xcworkspace` | yes | `` | | +| `scheme` | yes | `` | | +| `codeSignIdentity` | yes | `` | | +| `developmentTeam` | yes | `` | | +| `provisioningProfileSpecifier` | yes | `` | | + +## [`reusable-ios-version.yaml`](.github/workflows/reusable-ios-version.yaml) + +iOS bump version + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-ios-version.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ----------------- | -------- | ---------------- | -------------------------------- | +| `podSpecFilePath` | no | `REES46.podspec` | File path to podspec file | +| `appId` | yes | `` | App token for committing changes | + +## [`reusable-issue-management.yaml`](.github/workflows/reusable-issue-management.yaml) + +Resuable issue management + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-issue-management.yaml@master + with: + # ... +``` + +| name | required | default | description | +| --------------- | -------- | ------- | ----------- | +| `retries` | no | `3` | | +| `projectNumber` | yes | `` | | +| `appId` | yes | `` | | + +## [`reusable-js-checks.yaml`](.github/workflows/reusable-js-checks.yaml) + +Reusable JS/TS PR checks + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-js-checks.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ------------------ | -------- | ------- | ----------------------------------------------------------------------- | +| `app-id` | yes | `` | github app id | +| `node-version` | no | `22` | Node version to run this workflow. Default: 19 as it is in action cache | +| `workingDirectory` | no | `./` | Working direction for action | + +## [`reusable-js-docker.yaml`](.github/workflows/reusable-js-docker.yaml) + +Reusable JS/TS Docker + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-js-docker.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ------------------ | -------- | -------- | ---------------------------------------------------------------------- | +| `branch` | no | `master` | Working branch | +| `nodeVersion` | no | `20` | Node version to run this workflow. Default 20 as it is in action cache | +| `workingDirectory` | no | `./` | Where the script should execute | +| `tag` | no | `latest` | Docker tag | + +## [`reusable-js-publish.yaml`](.github/workflows/reusable-js-publish.yaml) + +Reusable JS/TS version bump & create PR + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-js-publish.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ------------------ | -------- | --------- | ----------------------------------------------------------------------- | +| `appId` | yes | `` | github app id | +| `node-version` | no | `22` | Node version to run this workflow. Default: 19 as it is in action cache | +| `workingDirectory` | no | `./` | Working direction for action | +| `exclude` | no | `nothing` | Which workspaces to exclude | + +## [`reusable-js-version.yaml`](.github/workflows/reusable-js-version.yaml) + +Reusable JS/TS version bump & create PR + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-js-version.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ------------------ | -------- | ------- | ----------------------------------------------------------------------- | +| `appId` | yes | `` | github app id | +| `node-version` | no | `22` | Node version to run this workflow. Default: 19 as it is in action cache | +| `workingDirectory` | no | `./` | Working direction for action | +| `reviewerUsername` | no | `./` | Working direction for action | +| `exclude` | no | `.` | Exclude to bump | +| `checkChanges` | no | `true` | Should run 'yarn --since'? | +| `private` | no | `false` | Should apply only to private? | + +## [`reusable-multiplatform-version-bump.yaml`](.github/workflows/reusable-multiplatform-version-bump.yaml) + +Reusable version bump + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-multiplatform-version-bump.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ------------------ | -------- | -------------- | -------------------------------- | +| `appId` | yes | `` | App token for committing changes | +| `reviewerUsername` | no | `TorinAsakura` | Pull request reviewer | + +## [`reusable-php-checks.yaml`](.github/workflows/reusable-php-checks.yaml) + +Reusable PHP PR checks + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-php-checks.yaml@master + with: + # ... +``` + +## [`reusable-php-docker-publish.yaml`](.github/workflows/reusable-php-docker-publish.yaml) + +Reusable PHP docker publish + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-php-docker-publish.yaml@master + with: + # ... +``` + +| name | required | default | description | +| -------- | -------- | ------- | --------------- | +| `branch` | yes | `` | Git branch name | + +## [`reusable-pr-check-only-from-branch.yaml`](.github/workflows/reusable-pr-check-only-from-branch.yaml) + +Enforce merge source rule + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-pr-check-only-from-branch.yaml@master + with: + # ... +``` + +| name | required | default | description | +| --------------- | -------- | -------- | ----------------------------------------- | +| `allowedBranch` | yes | `stage` | Which branch is allowed to be merged from | +| `allowedTarget` | no | `master` | Which target branch is allowed | + +## [`reusable-release-commit-finder.yaml`](.github/workflows/reusable-release-commit-finder.yaml) + +Release commit finder + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-release-commit-finder.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ------------------ | -------- | ------------------------ | ---------------------------------------------------------- | +| `fetchDepth` | no | `2` | Checkout fetch depth | +| `commitMessage` | no | `feat(release): version` | Commit message to find | +| `cancelRunIfFound` | no | `True` | Abort workflow execution when the target commit is missing | + +## [`reusable-ruby-checks.yaml`](.github/workflows/reusable-ruby-checks.yaml) + +Reusable Ruby PR checks + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-ruby-checks.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ------------------ | -------- | ------- | ---------------------------- | +| `workingDirectory` | no | `./` | Working direction for action | +| `rubyVersion` | no | `2.7.5` | Ruby version to use | +| `nodeVersion` | no | `20` | Node version to use | + +## [`reusable-ruby-publish-migrated-db.yaml`](.github/workflows/reusable-ruby-publish-migrated-db.yaml) + +Reusable Ruby publish migrated DB + +```yaml +jobs: + build: + uses: rees46/workflow/.github/workflows/reusable-ruby-publish-migrated-db.yaml@master + with: + # ... +``` + +| name | required | default | description | +| ------------------ | -------- | ------- | ---------------------------- | +| `workingDirectory` | no | `./` | Working direction for action | +| `rubyVersion` | no | `2.7.5` | Ruby version to use | +| `nodeVersion` | no | `20` | Node version to use | From 0d0cd118c3b15cc4a0ab3837c07df01106023fc7 Mon Sep 17 00:00:00 2001 From: Andrew Ghostuhin Date: Sun, 20 Jul 2025 23:01:06 +0300 Subject: [PATCH 6/7] fix(scripts): naming --- scripts/repo-replacement/src/entrypoint.ts | 8 +++++--- .../directory.replacements-processor.ts | 7 ++++--- .../repo-replacement/src/replacement-processors/index.ts | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/scripts/repo-replacement/src/entrypoint.ts b/scripts/repo-replacement/src/entrypoint.ts index a7458d10..1e1312e3 100644 --- a/scripts/repo-replacement/src/entrypoint.ts +++ b/scripts/repo-replacement/src/entrypoint.ts @@ -1,7 +1,7 @@ import type { Config } from './interfaces/index.js' import { getArguments } from './getters/index.js' -import { direcotryReplacementProcessor } from './replacement-processors/index.js' +import { directoryReplacementProcessor } from './replacement-processors/index.js' import { applyReplacementProcessor } from './replacement-processors/index.js' import { fileContentReplacementProcessor } from './replacement-processors/index.js' import { deleteReplacementProcessor } from './replacement-processors/index.js' @@ -9,10 +9,12 @@ import { checkDirectoryExist } from './utils/index.js' import { escapeRegExpUtil } from './utils/index.js' import { checkArgumentsUtil } from './utils/index.js' +/* eslint-disable no-console, n/no-process-exit, eslint-comments/no-unused-disable */ const { configString, targetDir } = getArguments() checkArgumentsUtil({ configString, targetDir }) -export const main = async () => { +/* eslint-disable no-console, n/no-process-exit */ +export const main = async (): Promise => { try { const config: Config = JSON.parse(configString) @@ -26,7 +28,7 @@ export const main = async () => { console.log('Delete completed successfully!') console.log('Starting replacement process...') - await direcotryReplacementProcessor({ + await directoryReplacementProcessor({ directory: targetDir, config, applyReplacementProcessor, diff --git a/scripts/repo-replacement/src/replacement-processors/directory.replacements-processor.ts b/scripts/repo-replacement/src/replacement-processors/directory.replacements-processor.ts index 93f2578b..639d51e4 100644 --- a/scripts/repo-replacement/src/replacement-processors/directory.replacements-processor.ts +++ b/scripts/repo-replacement/src/replacement-processors/directory.replacements-processor.ts @@ -1,9 +1,10 @@ +/* eslint-disable no-console, n/no-sync, no-await-in-loop, @typescript-eslint/explicit-function-return-type, @typescript-eslint/explicit-module-boundary-types, eslint-comments/no-unused-disable */ import type { DirecotryReplacementProcessorProps } from '../interfaces/index.js' import fs from 'node:fs' import path from 'node:path' -export const direcotryReplacementProcessor = async ({ +export const directoryReplacementProcessor = async ({ directory, config, applyReplacementProcessor, @@ -51,7 +52,7 @@ export const direcotryReplacementProcessor = async ({ const newPath = path.join(directory, newName) fs.renameSync(fullPath, newPath) console.info(`Direcotry renamed: from ${fullPath} to ${newPath}`) - await direcotryReplacementProcessor({ + await directoryReplacementProcessor({ directory: newPath, config, applyReplacementProcessor, @@ -59,7 +60,7 @@ export const direcotryReplacementProcessor = async ({ escapeRegExpUtil, }) } else { - await direcotryReplacementProcessor({ + await directoryReplacementProcessor({ directory: fullPath, config, applyReplacementProcessor, diff --git a/scripts/repo-replacement/src/replacement-processors/index.ts b/scripts/repo-replacement/src/replacement-processors/index.ts index 212d6923..977bc94d 100644 --- a/scripts/repo-replacement/src/replacement-processors/index.ts +++ b/scripts/repo-replacement/src/replacement-processors/index.ts @@ -1,4 +1,4 @@ export * from './apply.replacement-processor.js' -export * from './directory.replacements-processor.js' +export { directoryReplacementProcessor } from './directory.replacements-processor.js' export * from './file-content.replacement-processor.js' export * from './delete.replacement-processor.js' From c165353ff34056e4f71a746f0e0a1883ef9f71a6 Mon Sep 17 00:00:00 2001 From: Andrew Ghostuhin Date: Sun, 20 Jul 2025 23:04:16 +0300 Subject: [PATCH 7/7] fix(actions): jq & yq --- .github/actions/sync/read-replacements/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/sync/read-replacements/action.yml b/.github/actions/sync/read-replacements/action.yml index 6b7718d9..06c819a0 100644 --- a/.github/actions/sync/read-replacements/action.yml +++ b/.github/actions/sync/read-replacements/action.yml @@ -42,6 +42,10 @@ runs: token: ${{ steps.appTokenStep.outputs.token }} repository: ${{inputs.replacementsRepo}} + - name: Install jq and yq + run: | + apt-get update && apt-get install -y jq yq + - name: Read replacements from file shell: bash id: getReplacementsStep