{"id":15791477,"url":"https://github.com/levonet/experiment-github-actions-monorepo","last_synced_at":"2026-01-08T15:47:23.700Z","repository":{"id":49292530,"uuid":"342813602","full_name":"levonet/experiment-github-actions-monorepo","owner":"levonet","description":null,"archived":false,"fork":false,"pushed_at":"2021-12-31T18:48:03.000Z","size":41,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-11T23:05:26.662Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/levonet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-27T09:03:14.000Z","updated_at":"2021-11-17T23:33:25.000Z","dependencies_parsed_at":"2022-09-05T06:21:50.845Z","dependency_job_id":null,"html_url":"https://github.com/levonet/experiment-github-actions-monorepo","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Fexperiment-github-actions-monorepo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Fexperiment-github-actions-monorepo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Fexperiment-github-actions-monorepo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Fexperiment-github-actions-monorepo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levonet","download_url":"https://codeload.github.com/levonet/experiment-github-actions-monorepo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246523890,"owners_count":20791443,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-04T23:01:01.646Z","updated_at":"2026-01-08T15:47:23.678Z","avatar_url":"https://github.com/levonet.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# experiment-github-actions-monorepo\n\n- `+` pros:\n  - Швидкий чекаут репозіторію\n  - Конфігурація в коді, не вимагає ручного налаштування репозіторія \n  - Не потрібно використовувати додаткові інструменти для створення CI/CD pipeline\n  - Нативно відомо про зміни між мерджкоммітами в master, тому легко зробити зборку і деплой лише того, де відбулись зміни\n  - Просте створення і публікація власних дій — добре для PR.\n  - Кеш просто неймовірний!!!\n  - ніяких проблем з лімітами API\n\n- `-` cons:\n  - [Investigating - We are investigating reports of degraded performance for GitHub Actions.](https://www.githubstatus.com)\n  - [Github Action stuck at queue](https://github.community/t/github-action-stuck-at-queue/16869/139)\n  - runner не очищується після роботи джоби.\n    Трохи про це і інше https://dev.to/wayofthepie/hacking-together-an-actions-runner-orchestrator-5ef9\n    https://github.com/actions-runner-controller/actions-runner-controller\n    https://github.com/github-developer/self-hosted-runners-anthos\n    Потрібен механізм який би вбивав runner після джоби і створював його знову (runner-controller).\n  - Не підтримуються нативний запуск приватних дій\n    https://github.com/github/roadmap/issues/74\n  - Using cache on tags does not work\n    https://github.com/actions/cache/issues/556\n  - Якщо запускаємо через workflow_dispatch то:\n    - Не інформативний дашбоард workflows по запускам, відсутня можливість додати інформацію (проект, тег, deploy_group, deploy_state)\n      https://github.community/t/github-actions-dynamic-name-of-the-workflow-with-workflow-dispatch/150327\n    - запускається на чистому бранчі, потрібно чекаутити `refs/pull/{number}/merged` (тільки для відкритого PR).\n      Для закритого PR/видаленого бранча, потрібно запускати над бранчем/master, але не втратити інформацію що це дії над PR.\n      (для master і tags все як зазвичай)\n    - пусті github.event.pull_request, github.event.action, github.base_sha, github.base_ref, потрібно знаходити цю інформацію\n    - Для workflow_dispatch не можливо обрати tags в UI\n      https://github.community/t/workflow-dispatch-from-a-tag-in-actions-tab/130561\n    - не відомо про зміни під час тригеру tags, потрібно витягнути проект з назви тегу (але це нормальна практика)\n  - якщо не спрацював Github хук, то складно його відтворити\n\n## Expirience GA in Enterprise\n\nЯкі є проблеми для впровадження GA?\n\n- В першу чергу, багато нових і не нових функцій не доступні в Enterprise, або не публічних репозіторії\n  Це звучить дивно, але це так.\n  Наприклад відсутня можливість публікувати GA в приватних репозіторіях для внутрішнього використання\n- Та частина GA яка моглаб відповідати за процеси розгортання дуже слабо пророблена\n  (Відсутня можливість підписати dipatch_workflow)\n  (ранери не очищуються після запуску джоби)\n\n\n  Take my mony but give me tools.\n  Ці складнощі ускладнюють впровадження GA в корпораціях, тому що доводиться шукати обхідні шляхи\n\n- відсутність достатньої інформації для того щоб інтегрувати рани в конвеєр CI/CD\n  (ім'я джоби при матричному запуску, jobId або jobUrl)\n  доводиться писати власні костилі на JS\n\n- Якщо ви вигружаєте через blablacar/action-download-last-artifact то це займає багато часу, бо на великих рєпо з купою артифактів API починає гальмувати (до хвилини)\n\n- Немає можливості обрати більш потужні машини для операцій, але це можна вирішити селфхостед\n\n- відсутність можливості оновити воркфлоу в всіх рєпо організації\n\n- доступ до артифактів дуже повільний для великих проектів з великою кількістю невеликих артифактів\n\n## Push by a stick\n\nhttps://github.com/github/roadmap/projects/1?card_filter_query=label%3Aactions\n\nhttps://github.com/marketplace/actions/paths-changes-filter\nhttps://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions\nhttps://docs.github.com/en/actions/reference/events-that-trigger-workflows\n\nCreate a repository dispatch event\nhttps://docs.github.com/en/rest/reference/repos#create-a-repository-dispatch-event\n\nhttps://github.com/actions/first-interaction\nhttps://github.com/google-github-actions\nhttps://github.com/google-github-actions/get-secretmanager-secrets\nhttps://github.com/github-developer/octochat-gcp\n\n\n### `workflow_dispatch`\n\ncurl -X POST -H 'Accept: application/vnd.github.v3+json' -H 'Authorization: token \u003csecret\u003e' 'https://api.github.com/repos/gillbus/project-stub/actions/workflows/deploy.yml/dispatches' -d '{\"ref\":\"refs/heads/B2B-401.step2\",\"inputs\":{\"ref\":\"refs/pull/59/merge\",\"project\":\".\",\"deploy_group\":\"dev1\",\"deploy_state\":\"absent\"}}'\n\ncurl -X POST \\\n  -H 'Accept: application/vnd.github.v3+json' \\ \n  -H 'Authorization: token \u003csecret\u003e' \\\n  'https://api.github.com/repos/levonet/experiment-github-actions-monorepo/actions/workflows/runner.yml/dispatches' \\\n  -d '{\"ref\":\"refs/tags/v0.0.4\",\"inputs\":{\"deploy_group\":\"dev2\",\"deploy_state\":\"balancer\"}}'\n\n\n### `workflow_run`\n\n**Потрібно перевірити таку можливість тригірити workflow по завершенню попереднього**\n\n```yaml\nname: Preflight\non:\n  - pull_request\n  - push\njobs:\n  preflight-job:\n    runs-on: ubuntu-latest\n    steps:\n      - run: env\n```\n\n```yaml\nname: Test\non:\n  workflow_run:\n    workflows:\n    - Preflight\n    types:\n    - completed\njobs:\n  test-job:\n    name: Test Step\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n        with:\n          ref: ${{ github.event.workflow_run.head_branch }}\n      - run: git branch\n      - run: env\n```\n\n### `repository_dispatch`\n\n[Tutorial](https://www.r-bloggers.com/2020/07/running-github-actions-sequentially/)\n\ncurl -XPOST -u \"${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}\" -H \"Accept: application/vnd.github.everest-preview+json\" -H \"Content-Type: application/json\" https://api.github.com/repos/YOURNAME/APPLICATION_NAME/actions/workflows/build.yaml/dispatches --data '{\"ref\": \"master\"}'\non: workflow_dispatch\n\ncurl -XPOST -u \"${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}\" -H \"Accept: application/vnd.github.everest-preview+json\" -H \"Content-Type: application/json\" https://api.github.com/repos/YOURNAME/APPLICATION_NAME/dispatches --data '{\"event_type\": \"build_application\"}'\n\ncurl --location --request GET 'https://api.github.com/repos/levonet/experiment-github-actions-monorepo/actions/workflows/runner.yml/runs?branch=master\u0026per_page=1' -H \"Authorization: token \u003csecret\u003e\" -H \"Content-Type: application/vnd.github.v3+json\"\n\n```yaml\nname: projects\n\non: repository_dispatch\n\njobs:\n\n  server:\n    if: github.event.client_payload.job == 'server'\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@master\n      - name: Build Server\n        working-directory: ./apps/server\n        run: ./gradlew clean build\n\n  client:\n      if: github.event.client_payload.job == 'client'\n      runs-on: ubuntu-latest\n      steps:\n        - uses: actions/checkout@master\n        - name: Build Client\n          working-directory: ./apps/client\n          run: ./gradlew clean build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevonet%2Fexperiment-github-actions-monorepo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevonet%2Fexperiment-github-actions-monorepo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevonet%2Fexperiment-github-actions-monorepo/lists"}