{"id":37795230,"url":"https://github.com/leblancmeneses/actions","last_synced_at":"2026-01-16T15:19:47.062Z","repository":{"id":241626235,"uuid":"806769960","full_name":"leblancmeneses/actions","owner":"leblancmeneses","description":"custom github actions used throughout our pipelines","archived":false,"fork":false,"pushed_at":"2026-01-14T03:00:43.000Z","size":3147,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-14T04:00:58.454Z","etag":null,"topics":["actions","affected","pragma","versioning"],"latest_commit_sha":null,"homepage":"https://www.robusthaven.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leblancmeneses.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-27T21:38:49.000Z","updated_at":"2026-01-14T00:10:49.000Z","dependencies_parsed_at":"2024-05-29T10:49:15.449Z","dependency_job_id":"d4d96c63-375b-40b6-a499-03994880e2c9","html_url":"https://github.com/leblancmeneses/actions","commit_stats":null,"previous_names":["leblancmeneses/actions"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/leblancmeneses/actions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leblancmeneses%2Factions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leblancmeneses%2Factions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leblancmeneses%2Factions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leblancmeneses%2Factions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leblancmeneses","download_url":"https://codeload.github.com/leblancmeneses/actions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leblancmeneses%2Factions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["actions","affected","pragma","versioning"],"created_at":"2026-01-16T15:19:46.624Z","updated_at":"2026-01-16T15:19:47.049Z","avatar_url":"https://github.com/leblancmeneses.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![GitHub Actions](./docs/graphics/repository-open-graph-template.png)\n\n- [Actions](#actions)\n  - [1. Version Autopilot Action](#1-version-autopilot-action)\n  - [2. Pragma Action](#2-pragma-action)\n  - [3. Affected Action](#3-affected-action)\n  - [4. Affected Cache Action](#4-affected-cache-action)\n  - [5. Run Cache Action](#5-run-cache-action)\n- [Referencing Actions](#referencing-actions)\n- [Recommendations for multi-job pipeline](#recommendations-for-multi-job-pipeline)\n- [Run locally](#run-locally)\n- [Contributing](#contributing)\n- [Need Help?](#need-help)\n- [License](#license)\n\n# Actions\n\n## 1. Version Autopilot Action\n\nThis is perfect for packages that are not meant to be **consumed** by other packages, like a website or a mobile app,\nwhere semantic versioning is not required and is continuously deployed.\n\nThis will automatically increment the version on every **run** of your github action pipeline.\n\n[Documentation](docs/version-autopilot.md)\n\n## 2. Pragma Action\n\nThis GitHub Action allows pull requests to change behavior allowing builds to accept `[skip,deploy,force]` style flags.\n\n[Documentation](docs/pragma.md)\n\n## 3. Affected Action\n\nHave a polyglot build system? This task is for you. This task is designed for projects in mono repos that are not *fully* covered by a single build tool similar to Make, Bazel, or Nx. It helps track the dependency graph and streamline your pipeline by identifying and executing only the steps impacted by recent changes.\n\n[Documentation](docs/affected.md)\n\n## 4. Affected Cache Action\n\nThis task is designed to help you cache jobs or tasks completed to speed up your pipeline. It consumes outputs from the Affected Action to identify the project targets and their corresponding SHA revision. Additionally, it leverages the Pragma Action to handle scenarios where caching should be bypassed, such as when a pull request requires skipping the cache. `x__skip-cache=true` or `x__target-cache='skip'`\n\nBy using this Cache Action in conjunction with the Affected Action, you can significantly reduce build times and enhance the efficiency of your pipelines.\n\n[Documentation](docs/affected-cache.md)\n\n## 5. Run Cache Action\n\nIt executes shell commands and caches successful results to avoid redundant execution of expensive operations. The action supports multiple shell types (bash, sh, python, node, powershell) and can optionally capture and cache command stdout for state management.\n\nKey features:\n- **Smart caching**: Only re-runs commands when cache misses occur\n- **Multi-shell support**: Works with bash, sh, python, node, and powershell\n- **Stdout capture**: Optionally captures and returns command output (e.g. json) for downstream jobs\n- **Failure handling**: Only caches successful command executions\n\n[Documentation](docs/run-cache.md)\n\n\n# Referencing Actions\n\n\u003e [!CAUTION]\n\u003e We recommend locking the `uses:` clause to a specific tag or sha to avoid pipeline\n\u003e breakage due to future changes in the action.\n\n```yaml\nuses: leblancmeneses/actions/apps/\u003ctaskname\u003e@main # latest (only if you are okay with breakage)\nuses: leblancmeneses/actions/apps/\u003ctaskname\u003e@v1.1.1 # specific tag\nuses: leblancmeneses/actions/apps/\u003ctaskname\u003e@commit-sha # specific sha\n```\n\n\n# Recommendations for multi-job pipeline\n\nA [single job pipeline](https://github.com/leblancmeneses/actions/blob/main/.github/workflows/ci.yml) is a great starting point for CI/CD workflows.\nStart here if you are new to GitHub Actions or have a simple project.\n\nAs your project evolves, you may need to divide your pipeline into multiple jobs to enhance speed (parallel jobs), maintainability, and accommodate different operating systems for various tools.\n\nCreate an init job to calculate variables needed across multiple jobs. This will avoid redundant checkouts and calculations across each job.\n\nGenerate an template.job.init.yml file with the following content:\n\n```yaml\nname: template.job.init\n\non:\n  workflow_call:\n    outputs:\n      affected:\n        value: ${{ jobs.init.outputs.affected }}\n      pragma:\n        value: ${{ jobs.init.outputs.pragma }}\n      cache:\n        value: ${{ jobs.init.outputs.cache }}\n      version-autopilot:\n        value: ${{ jobs.init.outputs.version-autopilot }}\n\njobs:\n  init:\n    runs-on: ubuntu-latest\n    outputs:\n      affected: ${{steps.affected.outputs.affected}}\n      pragma: ${{steps.pragma.outputs.pragma}}\n      cache: ${{steps.cache.outputs.cache}}\n      version-autopilot: ${{steps.version-autopilot.outputs.version_autopilot}}\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n\n      - name: calculate pragma outputs\n        id: pragma\n        uses: leblancmeneses/actions/apps/pragma@main\n        with:\n          variables: |\n            skip-cache=false\n\n      - name: calculate affected\n        id: affected\n        uses: leblancmeneses/actions/apps/affected@main\n        with:\n          # recommended-imagetags-registry: \"${{ env.IMAGE_REGISTERY_PATH }}/${{ env.GCP_PROJECT_ID }}/${{ github.event_name == 'pull_request' \u0026\u0026 github.event.pull_request.base.ref || github.ref_name }}/\"\n          changed-files-output-file: .artifacts/affected.json\n          rules-file: .github/affected.rules\n          recommended-imagetags-tag-format: '{target}{sha}'\n          recommended-imagetags-tag-format-whenchanged: ${{ github.event_name == 'pull_request' \u0026\u0026 format('pr-{0}-{1}', github.event.number, '{sha|10}') || '{sha}' }}\n\n      - name: cache\n        id: cache\n        uses: leblancmeneses/actions/apps/affected-cache@main\n        with:\n          access-key: ${{ secrets.CACHE_ACCESS_KEY }}\n          secret-key: ${{ secrets.CACHE_SECRET_KEY }}\n          endpoint: ${{ vars.CACHE_ENDPOINT }}\n          affected: ${{steps.affected.outputs.affected}}\n          pragma: ${{steps.pragma.outputs.pragma}}\n          storage-path: s3://xxx-my-github-integration/build-cache\n          additional-keys: |\n            { \"project-ui\": [\"lint\", \"build\", \"docker\", \"e2e\"] }\n\n      - name: upload affected output\n        uses: actions/upload-artifact@v4\n        with:\n          name: affected\n          if-no-files-found: ignore\n          retention-days: 1\n          path: .artifacts/**\n          include-hidden-files: true\n\n      - name: calculate version-autopilot outputs\n        id: version-autopilot\n        uses: leblancmeneses/actions/apps/version-autopilot@main\n        with:\n          major: 0\n          minor: 0\n          shift: 0\n\n      # Add more steps or calculations here to validate run.\n      # ...\n\n```\n\n```yaml\nname: build\n\non:\n  push:\n    # ...\n  pull_request:\n    # ...\n  workflow_dispatch:\n    # ...\n\njobs:\n  vars:\n    uses: ./.github/workflows/template.job.init.yml\n\n  show-output:\n    needs: [vars]\n    runs-on: ubuntu-latest\n    steps:\n      - name: checkout code\n        uses: actions/checkout@v4\n        with:\n          persist-credentials: false\n\n      - name: download affected\n        uses: actions/download-artifact@v4\n        with:\n          name: affected\n          path: .artifacts/\n\n      - name: example output\n        run: |\n          echo \"affected: \"\n          echo '${{ needs.vars.outputs.affected }}' | jq .\n          echo \"pragma: \"\n          echo '${{ needs.vars.outputs.pragma }}' | jq .\n          echo \"version-autopilot: \"\n          echo '${{ needs.vars.outputs.version-autopilot }}' | jq .\n          echo \"cache: \"\n          echo '${{ needs.vars.outputs.cache }}' | jq .\n\n          cat ./.artifacts/affected.json\n          for file in $(jq -r '.[] | .file' ./.artifacts/affected.json); do\n            echo \"processing: $file\"\n          done\n\n  # # Example of reusable job workflows that leverage affected, cache, and pragma outputs.\n  # build-api:\n  #   needs: [vars]\n  #   uses: ./.github/workflows/template.job.build.yml\n  #   if: |\n  #     !failure() \u0026\u0026 !cancelled() \u0026\u0026 (\n  #       inputs.MANUAL_FORCE_BUILD == 'true' || (\n  #         fromJson(needs.vars.outputs.affected).build-api.changes == true \u0026\u0026\n  #         fromJson(needs.vars.outputs.cache).build-api.cache-hit == false\n  #       )\n  #     )\n  #   with:\n  #     CACHE: ${{toJson(fromJson(needs.vars.outputs.cache).build-api)}}\n  #     DOCKER_FILE: \"./build-api/Dockerfile\"\n  #     DOCKER_BUILD_ARGS: \"IS_PULL_REQUEST=${{github.event_name == 'pull_request'}}\"\n  #     DOCKER_CONTEXT: \"./build-api\"\n  #     DOCKER_LABELS: ${{needs.vars.outputs.IMAGE_LABELS}}\n  #     DOCKER_IMAGE_TAGS: ${{ fromJson(needs.vars.outputs.affected).build-api.recommended_imagetags \u0026\u0026\n  #          toJson(fromJson(needs.vars.outputs.affected).build-api.recommended_imagetags) || '[]' }}\n  #     version_offsets: '{\"MAJOR\":5, \"MINOR\": 1, \"SHIFT\": 0}'\n  #   secrets:\n  #     GCP_GITHUB_SERVICE_ACCOUNT: ${{secrets.GCP_GITHUB_SERVICE_ACCOUNT}}\n```\n\n\n# Run locally\n\n```bash\nnvm use\npnpm i\npnpm nx run-many --target=test --parallel --skip-nx-cache\npnpm nx run-many --target=build --parallel --skip-nx-cache\n```\n\n# Contributing\nContributions are welcome! Please open an issue or submit a pull request if you have suggestions or improvements.\n\n\n# Need Help?\n\nLarge language models (LLMs) cannot solve your organization's people problems. If your software teams are struggling and falling behind, consider engaging an actual human expert who can identify product and development issues and provide solutions.\n\nCommon areas where we can assist include DSL development, continuous delivery, cloud migrations, Kubernetes cluster cost optimizations, GitHub Actions and GitHub Codespaces.\n\nContact us at [improvingstartups.com](https://improvingstartups.com).\n\n\n# License\nThis project is licensed under the [MIT License](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleblancmeneses%2Factions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleblancmeneses%2Factions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleblancmeneses%2Factions/lists"}