{"id":19020145,"url":"https://github.com/gayanvoice/javascript-action","last_synced_at":"2025-02-21T18:21:36.955Z","repository":{"id":51193863,"uuid":"365658822","full_name":"gayanvoice/javascript-action","owner":"gayanvoice","description":"JavaScript Action makes it easy to commit all your changes to repository with CI/CD. ","archived":false,"fork":false,"pushed_at":"2022-11-30T12:52:50.000Z","size":801,"stargazers_count":1,"open_issues_count":4,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-02T00:25:04.188Z","etag":null,"topics":["fs-extra","github-actions","javascript","javascript-action","simple-git"],"latest_commit_sha":null,"homepage":"https://github.com/gayanvoice/javascript-action-template","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/gayanvoice.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}},"created_at":"2021-05-09T03:28:17.000Z","updated_at":"2024-07-31T01:13:46.000Z","dependencies_parsed_at":"2022-08-31T11:03:25.391Z","dependency_job_id":null,"html_url":"https://github.com/gayanvoice/javascript-action","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gayanvoice%2Fjavascript-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gayanvoice%2Fjavascript-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gayanvoice%2Fjavascript-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gayanvoice%2Fjavascript-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gayanvoice","download_url":"https://codeload.github.com/gayanvoice/javascript-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240064605,"owners_count":19742347,"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":["fs-extra","github-actions","javascript","javascript-action","simple-git"],"created_at":"2024-11-08T20:15:53.491Z","updated_at":"2025-02-21T18:21:36.925Z","avatar_url":"https://github.com/gayanvoice.png","language":"JavaScript","readme":"# JavaScript Action | File Handling and GitHub Operations\n\nUse this repository to bootstrap the creation of a JavaScript action for file handling and Git operations.\n\nThis repository includes create directory, create Json file, read Json file, git commit and git push.\n\n## Create an action from this repository\n\n### 1. Folk the repository\n\n### 2. Change the git.js\n\nGo to \u003ca href=\"https://github.com/gayanvoice/github-javascript-action/blob/master/src/git/git.js\"\u003esrc/git/git.js\u003c/a\u003e and\nchange \u003ca href=\"https://github.com/gayanvoice/github-javascript-action/blob/master/src/git/git.js#L6\"\u003e\nuser.email\u003c/a\u003e with your GitHub account's primary email\nand \u003ca href=\"https://github.com/gayanvoice/github-javascript-action/blob/master/src/git/git.js#L7\"\u003e\nuser.name\u003c/a\u003e with your GitHub profile name.\n\n```javascript\nconst {exec} = require('child_process');\nconst core = require('@actions/core');\n\nasync function commit() {\n    core.info('git commit');\n    exec('git config --global user.email \"username@mail.com\"');\n    exec('git config --global user.name \"GitHub Name\"');\n    exec('git add .');\n    exec('git commit -m \"message\"');\n}\n\nmodule.exports = commit\n```\n\n### 3. Package for distribution\n\nRun prepare\n\n```bash\nnpm run prepare\n```\n\n### 4. Push changes to repository\n\n## Create a workflow\n\n### 1. Create an empty repository or go to an existing repository\n\n### 2. Create YML file in .github/workflows/main.yml and change to your JavaScript Action repository url\n\n```yml\nname: JavaScript CI\non:\n  push:\n    branches: [ main ]\n  pull_request:\n    branches: [ main ]\n  workflow_dispatch:\njobs:\n  deployment:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v2.3.3\n        with:\n          ref: ${{ github.head_ref }}\n          token: ${{ secrets.GITHUB_TOKEN }}\n      - name: JavaScript Action\n        uses: gayanvoice/javascript-action@master\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          SECRETS_CONTEXT: ${{ toJson(secrets) }}\n```\n### 3. Go to Actions to see the process","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgayanvoice%2Fjavascript-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgayanvoice%2Fjavascript-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgayanvoice%2Fjavascript-action/lists"}