3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2024-12-15 23:27:40 +00:00

Initial commit.

This commit is contained in:
Tonye Jack 2021-03-04 21:36:52 -05:00
commit 7eba13b12c
12 changed files with 183 additions and 0 deletions

10
.github/ISSUE_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,10 @@
* changed-files:
### Description
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.
### What I Did
Add some details about your workflow ?

18
.github/workflows/rebase.yml vendored Normal file
View file

@ -0,0 +1,18 @@
name: Automatic Rebase
on:
issue_comment:
types: [created]
jobs:
rebase:
name: Rebase
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PAT_TOKEN }}
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Automatic Rebase
uses: cirrus-actions/rebase@1.4
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}

View file

@ -0,0 +1,27 @@
name: Update release version.
on:
release:
types: [published]
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Sync release version
uses: tj-actions/sync-release-version@v8
id: sync-release-version
with:
pattern: 'tj-actions/changed-files@'
paths: |
README.md
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
base: "main"
title: "Upgraded to ${{ steps.sync-release-version.outputs.new_version }}"
branch: "upgrade-to-${{ steps.sync-release-version.outputs.new_version }}"
commit-message: "Upgraded from ${{ steps.sync-release-version.outputs.old_version }} -> ${{ steps.sync-release-version.outputs.new_version }}"
body: "View [CHANGES](https://github.com/${{ github.repository }}/compare/${{ steps.sync-release-version.outputs.old_version }}...${{ steps.sync-release-version.outputs.new_version }})"
token: ${{ secrets.PAT_TOKEN }}

21
.github/workflows/test.yml vendored Normal file
View file

@ -0,0 +1,21 @@
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
name: Test changed-files
steps:
- name: Checkout
uses: actions/checkout@v2
- name: shellcheck
uses: reviewdog/action-shellcheck@v1
- name: Run changed-files
uses: ./

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
.idea/
.envrc

0
CONTRIBUTING.md Normal file
View file

9
Dockerfile Normal file
View file

@ -0,0 +1,9 @@
FROM alpine:3.13.2
LABEL maintainer="Tonye Jack <jtonye@ymail.com>"
RUN apk add bash
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

7
HISTORY.md Normal file
View file

@ -0,0 +1,7 @@
History
-------
v1 (2021-03-04)
------------------
* Initial Release.

22
LICENSE Normal file
View file

@ -0,0 +1,22 @@
MIT License
Copyright (c) 2021, Tonye Jack
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

47
README.md Normal file
View file

@ -0,0 +1,47 @@
changed-files
-------------
Get modified files
```yaml
...
steps:
- uses: actions/checkout@v2
- name: Get modified files
uses: tj-actions/changed-files@v1
```
## Inputs
| Input | type | required | default | description |
|:-------------:|:-----------:|:-------------:|:----------------------------:|:-------------:|
| token | `string` | `true` | `${{ github.token }}` | [GITHUB_TOKEN](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow) <br /> or a repo scoped <br /> [Personal Access Token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) |
* Free software: [MIT license](LICENSE)
Features
--------
* TODO
Credits
-------
This package was created with [Cookiecutter](https://github.com/cookiecutter/cookiecutter).
Report Bugs
-----------
Report bugs at https://github.com/tj-actions/changed-files/issues.
If you are reporting a bug, please include:
* Your operating system name and version.
* Any details about your workflow that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.

17
action.yml Normal file
View file

@ -0,0 +1,17 @@
name: Get modified files
description: Get modified files
author: tj-actions
inputs:
token:
description: 'GITHUB_TOKEN or a Repo scoped PAT'
required: true
default: ${{ github.token }}
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.token }}
branding:
icon: git-pull-request
color: white

3
entrypoint.sh Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
set -e