All Projects → test-room-7 → action-update-file

test-room-7 / action-update-file

Licence: MIT License
Update (i.e. commit and push) files on GitHub

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to action-update-file

nightfall dlp action
GitHub Data Loss Prevention (DLP) Action: Scan Pull Requests for sensitive data, like credentials & secrets, PII, credit card numbers, and more.
Stars: ✭ 46 (+91.67%)
Mutual labels:  github-action
pr-reviews-reminder-action
A GitHub Action to send Slack/Teams notification for Pull Request that are waiting for reviewers.
Stars: ✭ 18 (-25%)
Mutual labels:  github-action
misspell-fixer-action
📝Automatically fixes typos and mistakes in your source code and docs!
Stars: ✭ 123 (+412.5%)
Mutual labels:  github-action
hugo-action
Commands to help with building Hugo based static sites
Stars: ✭ 65 (+170.83%)
Mutual labels:  github-action
bump-everywhere
🚀 Automate versioning, changelog creation, README updates and GitHub releases using GitHub Actions,npm, docker or bash.
Stars: ✭ 24 (+0%)
Mutual labels:  github-action
github-env-vars-action
🚀 GitHub Action for Environment Variables
Stars: ✭ 129 (+437.5%)
Mutual labels:  github-action
github-action-benchmark
GitHub Action for continuous benchmarking to keep performance
Stars: ✭ 592 (+2366.67%)
Mutual labels:  github-action
gajira
GitHub Actions for Jira
Stars: ✭ 100 (+316.67%)
Mutual labels:  github-action
ssh2actions
Connect to GitHub Actions VM via SSH for interactive debugging
Stars: ✭ 62 (+158.33%)
Mutual labels:  github-action
aliyun-oss-website-action
将网站部署到阿里云OSS. Deploy website on aliyun OSS(Alibaba Cloud OSS)
Stars: ✭ 42 (+75%)
Mutual labels:  github-action
assign-one-project-github-action
Automatically add an issue or pull request to specific GitHub Project(s) when you create and/or label them.
Stars: ✭ 140 (+483.33%)
Mutual labels:  github-action
watermelon-http-client
GitHub Action to perform HTTP requests. Supports GraphQL!
Stars: ✭ 21 (-12.5%)
Mutual labels:  github-action
action-snapcraft
🐦 GitHub Action for setting up Snapcraft
Stars: ✭ 34 (+41.67%)
Mutual labels:  github-action
github-action-markdown-cli
Style checking and linting for Markdown/CommonMark files.
Stars: ✭ 26 (+8.33%)
Mutual labels:  github-action
sass-build
GitHub Action JavaScript wrapper runs Sass build with provided Inputs
Stars: ✭ 16 (-33.33%)
Mutual labels:  github-action
action-ssh
GitHub Action for executing SSH commands on remote servers
Stars: ✭ 60 (+150%)
Mutual labels:  github-action
github-profile-3d-contrib
This GitHub Action creates a GitHub contribution calendar on a 3D profile image.
Stars: ✭ 230 (+858.33%)
Mutual labels:  github-action
git-actions
A GitHub Action to run arbitrary git commands
Stars: ✭ 72 (+200%)
Mutual labels:  github-action
overview
Automate your workflows with GitHub actions for MATLAB.
Stars: ✭ 40 (+66.67%)
Mutual labels:  github-action
laravel-phpinsights-action
Run PHP Insights in Laravel in Github Actions
Stars: ✭ 17 (-29.17%)
Mutual labels:  github-action

action-update-file Version Lint status

Update (i.e. commit and push) files on GitHub.

The action is perfectly suitable for updating files generated by scripts or other actions (e.g. distribution files).

Usage

The action requires GitHub token for authentication; no username or e-mail are required.

Basic usage

Here is an example of a workflow using action-update-file:

name: Resources
on: repository_dispatch
jobs:
    resources:
        name: Update resources
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v1

            - uses: actions/setup-node@v1

            - name: Fetch resources
              run: ./scripts/fetch-resources.sh

            - name: Update resources
              uses: test-room-7/action-update-file@v1
              with:
                  file-path: path/to/file
                  commit-msg: Update resources
                  github-token: ${{ secrets.GITHUB_TOKEN }}

Note that this action does not change files. They should be changed with scripts and/or other actions.

Update multiple files

You can also update multiple files:

- name: Update resources
  uses: test-room-7/action-update-file@v1
  with:
      file-path: |
          path/to/file1
          path/to/file2
          path/to/file3
      commit-msg: Update resources
      github-token: ${{ secrets.GITHUB_TOKEN }}

Use glob patterns

The action supports glob patterns as well:

- name: Update resources
  uses: test-room-7/action-update-file@v1
  with:
      # Include all JS files from the `dist` directory
      file-path: dist/*.js
      commit-msg: Update resources
      github-token: ${{ secrets.GITHUB_TOKEN }}

See the fast-glob documentation for glob syntax.

Inputs

Required inputs

  • commit-msg: a text used as a commit message
  • file-path: a path to file(s) or a glob pattern
  • github-token: GitHub token

Optional inputs

  • branch: branch to push changes (the default branch is used if no branch is specified)
  • allow-dot: allow glob patterns to match entries that begin with a period (false by default)
  • allow-removing: allow to remove file if local copy is missing (false by default)
  • committer-name: The name of the author (or committer) of the commit. (github-actions[bot] by default)
  • committer-email: The email of the author (or committer) of the commit. (github-actions[bot]@users.noreply.github.com by default)

Note that the action will produce an error if a local copy of a given file is missing, and the allow-removing flag is false.

Outputs

  • commit-sha: the hash of the commit created by this action

Development

# Install dependencies
> npm install

# Build the action
> npm run dist

# Lint project files
> npm run lint

Don't push dist files; they're updated automatically by the action itself.

License

Licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].