{"id":19443331,"url":"https://github.com/smashedr/js-test-action","last_synced_at":"2025-02-25T08:15:37.345Z","repository":{"id":204634060,"uuid":"712301158","full_name":"smashedr/js-test-action","owner":"smashedr","description":"JavaScraipt Test Action","archived":false,"fork":false,"pushed_at":"2025-02-21T09:15:07.000Z","size":743,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-21T09:39:59.906Z","etag":null,"topics":["actions","javascript"],"latest_commit_sha":null,"homepage":"https://cssnr.github.io","language":"JavaScript","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/smashedr.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}},"created_at":"2023-10-31T07:39:32.000Z","updated_at":"2025-02-18T00:32:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"863d4ea3-4346-4cd2-8f70-ee07595b792f","html_url":"https://github.com/smashedr/js-test-action","commit_stats":null,"previous_names":["smashedr/js-test-action"],"tags_count":5,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smashedr%2Fjs-test-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smashedr%2Fjs-test-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smashedr%2Fjs-test-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smashedr%2Fjs-test-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smashedr","download_url":"https://codeload.github.com/smashedr/js-test-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240627961,"owners_count":19831600,"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":["actions","javascript"],"created_at":"2024-11-10T15:42:50.402Z","updated_at":"2025-02-25T08:15:37.264Z","avatar_url":"https://github.com/smashedr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Release](https://img.shields.io/github/actions/workflow/status/smashedr/js-test-action/release.yaml?logo=github\u0026logoColor=white\u0026label=release)](https://github.com/smashedr/js-test-action/actions/workflows/release.yaml)\n[![Test](https://img.shields.io/github/actions/workflow/status/smashedr/js-test-action/test.yaml?logo=github\u0026logoColor=white\u0026label=test)](https://github.com/smashedr/js-test-action/actions/workflows/test.yaml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=smashedr_js-test-action\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=smashedr_js-test-action)\n[![GitHub Release Version](https://img.shields.io/github/v/release/smashedr/js-test-action?logo=github)](https://github.com/smashedr/js-test-action/releases/latest)\n[![GitHub Last Commit](https://img.shields.io/github/last-commit/smashedr/js-test-action?logo=github\u0026logoColor=white\u0026label=updated)](https://github.com/smashedr/js-test-action/graphs/commit-activity)\n[![Codeberg Last Commit](https://img.shields.io/gitea/last-commit/shaner/js-test-action/master?gitea_url=https%3A%2F%2Fcodeberg.org%2F\u0026logo=codeberg\u0026logoColor=white\u0026label=updated)](https://codeberg.org/shaner/js-test-action)\n[![GitHub Top Language](https://img.shields.io/github/languages/top/smashedr/js-test-action?logo=htmx\u0026logoColor=white)](https://github.com/smashedr/js-test-action)\n[![GitHub Repo Stars](https://img.shields.io/github/stars/smashedr/js-test-action?style=flat\u0026logo=github\u0026logoColor=white)](https://github.com/smashedr/js-test-action/stargazers)\n[![GitHub Org Stars](https://img.shields.io/github/stars/cssnr?style=flat\u0026logo=github\u0026logoColor=white\u0026label=org%20stars)](https://cssnr.github.io/)\n[![Discord](https://img.shields.io/discord/899171661457293343?logo=discord\u0026logoColor=white\u0026label=discord\u0026color=7289da)](https://discord.gg/wXy6m2X8wY)\n\n# JavaScript Test Action\n\n- [Inputs](#Inputs)\n  - [Permissions](#Permissions)\n- [Outputs](#Outputs)\n- [Examples](#Examples)\n- [Development](#Development)\n\nThis action creates or updates the provided `tag` to the `sha` has that triggered the workflow.\n\nThis includes inputs, outputs, job summary, and automatic token authentication.\n\n## Inputs\n\n| input   | required | default               | description                 |\n| ------- | -------- | --------------------- | --------------------------- |\n| tag     | No       | test                  | Tag to Create or Update     |\n| summary | No       | true                  | Add Summary to Job          |\n| token   | No       | `${{ github.token }}` | Only if External Token [^1] |\n\n\u003cdetails\u003e\u003csummary\u003e📜 View Example Job Summary\u003c/summary\u003e\n\n---\n\nUpdated: [test](https://github.com/smashedr/js-test-action/releases/tag/test) :arrow_right: `6470ef53102d5229672433f1adb6afa42e7b64d9`\n\n\u003cdetails\u003e\u003csummary\u003eInputs\u003c/summary\u003e\u003ctable\u003e\u003ctr\u003e\u003cth\u003eInput\u003c/th\u003e\u003cth\u003eValue\u003c/th\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003etag\u003c/td\u003e\u003ctd\u003etest\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003esummary\u003c/td\u003e\u003ctd\u003etrue\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\u003c/details\u003e\n\n---\n\n\u003c/details\u003e\n\nWith no inputs this will create/update the tag `test`.\n\n```yaml\n- name: 'JS Test Action'\n  uses: smashedr/js-test-action@master\n```\n\nWith all inputs. Note that `token` is NOT required.\n\n```yaml\n- name: 'JS Test Action'\n  uses: smashedr/js-test-action@master\n  with:\n    tag: test\n    summary: true\n    token: ${{ secrets.PAT }} # only include this if you need to use a PAT\n```\n\n### Permissions\n\nThis action requires the following permissions:\n\n```yaml\npermissions:\n  contents: write\n```\n\n## Outputs\n\n| output | description |\n| ------ | ----------- |\n| sha    | Tag Hash    |\n\n```yaml\n- name: 'JS Test Action'\n  id: test\n  uses: smashedr/js-test-action@master\n\n- name: 'Echo Output'\n  run: |\n    echo \"sha: '${{ steps.test.outputs.sha }}'\"\n```\n\n## Examples\n\n```yaml\nname: 'Test'\n\non:\n  workflow_dispatch:\n  push:\n\njobs:\n  test:\n    name: 'Test'\n    runs-on: ubuntu-latest\n    timeout-minutes: 5\n    permissions:\n      contents: write\n\n    steps:\n      - name: 'Checkout'\n        uses: actions/checkout@v4\n\n      - name: 'JS Test Action'\n        id: test\n        uses: smashedr/js-test-action@master\n\n      - name: 'Echo Outputs'\n        run: |\n          echo \"sha: '${{ steps.test.outputs.sha }}'\"\n```\n\n# Development\n\nA GitHub Actions Primer: https://docs.github.com/en/actions/sharing-automations/creating-actions\n\n## Actions Overview\n\nThis is a JavaScript Action. For other types see:\n\n- TypeScript: https://github.com/smashedr/ts-test-action\n- Docker/Python: https://github.com/smashedr/py-test-action\n\nThe heart of a GitHub Action is the [action.yml](action.yml) file. This describes everything about your action.\n\n- https://docs.github.com/en/actions/sharing-automations/creating-actions/metadata-syntax-for-github-actions\n\nJS Actions must be fully built in the action's environment. See the `build` in [package.json](package.json) for details.\n\n## Actions Toolkit\n\nThe toolkit contains many parts. The `@actions/core` is required and this action uses the `@actions/github` module.\n\n- https://github.com/actions/toolkit\n\nThis also uses `github.getOctokit`.\n\n- https://octokit.github.io/rest.js\n\n## Local Development\n\nTo run actions locally you need to install act: https://nektosact.com/installation/index.html\n\n```shell\nnpm install\nnpm run build:watch\nact -j test\n```\n\nAlternatively, to run from source, change `main` in [action.yml](action.yml) to `src/index.js` and\nrun: `act -j test --use-gitignore=false`\n\nFor advanced using with things like secrets, variables and context see: https://nektosact.com/usage/index.html\n\nYou should also review the options from `act --help`\n\nNote, the `.env`, `.secrets` and `.vars` files are automatically sourced with no extra options.\nTo source `event.json` you need to run act with `act -e event.json`\n\n[^1]:\n    The `${{ github.token }}` / `{{ secrets.GITHUB_TOKEN }}` is automatically passed, there is no need to manually pass these!\n    This is only available to allow users to pass a different token they have created and defined in their `secrets`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmashedr%2Fjs-test-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmashedr%2Fjs-test-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmashedr%2Fjs-test-action/lists"}