Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
Initial commit!
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai Norman Clasen committed May 20, 2020
0 parents commit 4ccf69a
Show file tree
Hide file tree
Showing 17 changed files with 1,747 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .autorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"plugins": [
"git-tag",
"all-contributors",
"conventional-commits",
"first-time-contributor"
],
"owner": "kai-tub",
"repo": "external-repo-sync-action",
"name": "kai-tub",
"email": "[email protected]"
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.txt text eol=lf
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: kai-tub

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce
1. I am using these ... inputs for the action
2. I am running the version `vX`
3. The warnings/errors on the GitHub Action log page are ...

**Expected behavior**
A clear and concise description of what you expected to happen.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEATURE REQUEST]"
labels: enhancement
assignees: kai-tub

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when ...

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/pr-request-idea.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: PR request idea
about: If you have an idea for a PR, use this template :)
title: "[PR IDEA]"
labels: PR idea
assignees: kai-tub

---

**Idea**
Please give a high-level description fo the idea and how you are going to implement it. :)
We can talk about the specific implementation details later. ;)

**Guidelines**
I've read:
- [ ] [code of conduct](https://github.com/kai-tub/external-repo-sync-action/blob/master/CODE_OF_CONDUCT.md)
- [ ] [contributing guidelines](https://github.com/kai-tub/external-repo-sync-action/blob/master/CONTRIBUTING.md)
16 changes: 16 additions & 0 deletions .github/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Comment to be posted to on first time issues
newIssueWelcomeComment: |
Thanks for opening your first issue here! 💖
Be sure to follow the issue template.
Then the issue will be worked on in no time. 👍
# Comment to be posted on PRs from first time contributors in your repository
newPRWelcomeComment: |
Thanks for opening this pull request! 💖
Please check out the [code of conduct](https://github.com/kai-tub/external-repo-sync-action/blob/master/CODE_OF_CONDUCT.md) and the [contributing guidelines](https://github.com/kai-tub/external-repo-sync-action/blob/master/CONTRIBUTING.md).
Although, you probably have read it already. 😎
# Comment to be posted on PR merges from first time contributors in your repository
firstPRMergeComment: |
Congrats on merging your first pull request! 🎉🎉🎉
We here are proud of you and your accomplishment 🏆.
![thanks-for-pr-image](https://raw.githubusercontent.com/wiki/kai-tub/external-repo-sync-action/community/thanks_for_pr.jpg)
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release

on:
push:
branches: [ master ]

jobs:
release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v2

- name: Prepare repository
run: git fetch --unshallow --tags
- name: get shipit
run: |
curl -vkL -o - https://github.com/intuit/auto/releases/download/v9.34.1/auto-linux.gz | gunzip > ~/auto
chmod a+x ~/auto
- name: Create Release
env:
# Using my own personal access token to be able to
# trigger automatic version bump afterwards.
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
run: |
~/auto shipit
191 changes: 191 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
name: tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}

jobs:
default_test:
name: Run with default settings
runs-on: ubuntu-latest
steps:
- name: Checkout current version
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Create files to sync
run: |
mkdir docs/
mkdir docs/folder_a/
mkdir docs/folder_b/
touch docs/hello.md
touch docs/folder_a/nice.png
touch docs/folder_b/nice_tmp.png
touch docs/folder_a/dog.JPG
- name: Sync with local action
uses: ./
with:
source-directory: "./docs"
branch: "tests"
dry-run: true
id: default_test
- name: Test output
run: |
sol="./folder_a/dog.JPG ./folder_a/nice.png ./folder_b/nice_tmp.png ./hello.md"
res="${{ steps.default_test.outputs.sync_result }}"
[ "$sol" = "$res" ] || { echo "::error::Failed default settings test"; exit 1; }
only_include_test:
name: Include only png and md
runs-on: ubuntu-latest
steps:
- name: Checkout current version
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Create files to sync
run: |
mkdir docs/
mkdir docs/folder_a/
mkdir docs/folder_a/sub_a/
touch docs/hello.md
touch docs/hello.png
touch docs/folder_a/nice.png
touch docs/folder_a/sub_a/nice.png
touch docs/folder_a/dog.JPG
- name: Sync with local action
uses: ./
with:
source-directory: "./docs"
branch: "tests"
dry-run: true
include-patterns: "*.md *.png"
id: only_include
- name: Test output
run: |
sol="./folder_a/nice.png ./folder_a/sub_a/nice.png ./hello.md ./hello.png"
res="${{ steps.only_include.outputs.sync_result }}"
[ "$sol" = "$res" ] || { echo "::error::Failed include only test"; exit 1; }
test_case_sensitivity:
name: Test case sensitivity
runs-on: ubuntu-latest
steps:
- name: Checkout current version
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Create files to sync
run: |
mkdir docs/
mkdir docs/folder_a/
mkdir docs/folder_a/sub_a/
touch docs/hello.md
touch docs/hello.png
touch docs/folder_a/nice.png
touch docs/folder_a/sub_a/nice.png
touch docs/folder_a/sub_a/nice_extension.PNG
touch docs/folder_a/dog.JPG
- name: Sync with local action
uses: ./
with:
source-directory: "./docs"
branch: "tests"
dry-run: true
include-patterns: "*.md *.png"
id: case_sensitivity
- name: Test output
run: |
sol="./folder_a/nice.png ./folder_a/sub_a/nice.png ./hello.md ./hello.png"
res="${{ steps.case_sensitivity.outputs.sync_result }}"
[ "$sol" = "$res" ] || { echo "::error::Failed case sensitivity test"; exit 1; }
test_exclude_only:
name: Exclude only JPG and md files
runs-on: ubuntu-latest
steps:
- name: Checkout current version
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Create files to sync
run: |
mkdir docs/
mkdir docs/folder_a/
mkdir docs/folder_a/sub_a/
mkdir docs/folder_b/
touch docs/hello.md
touch docs/hello.png
touch docs/folder_a/nice.png
touch docs/folder_a/sub_a/nice.png
touch docs/folder_a/sub_a/nice_extension.PNG
touch docs/folder_b/nice_tmp.png
touch docs/folder_a/dog.JPG
- name: Sync with local action
uses: ./
with:
source-directory: "./docs"
branch: "tests"
dry-run: true
exclude-patterns: "*.md *.JPG"
id: exclude_only
- name: Test output
run: |
sol="./folder_a/nice.png ./folder_a/sub_a/nice.png ./folder_a/sub_a/nice_extension.PNG ./folder_b/nice_tmp.png ./hello.png"
res="${{ steps.exclude_only.outputs.sync_result }}"
[ "$sol" = "$res" ] || { echo "::error::Failed exclude_only test"; exit 1; }
test_include_and_exclude:
name: Include only *.pdf but ignore *.tmp.pdf files
runs-on: ubuntu-latest
steps:
- name: Checkout current version
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Create files to sync
run: |
mkdir docs/
mkdir docs/folder_a/
mkdir docs/folder_b/
touch docs/hello.md
touch docs/hello.png
touch docs/hello.pdf
touch docs/folder_a/nice.png
touch docs/folder_a/nice.pdf
touch docs/folder_b/nice_tmp.png
touch docs/folder_b/nice.tmp.pdf
- name: Sync with local action
uses: ./
with:
source-directory: "./docs"
branch: "tests"
dry-run: true
include-patterns: "*.pdf"
exclude-patterns: "*.tmp.pdf"
id: include_exclude
- name: Test output
run: |
sol="./folder_a/nice.pdf ./hello.pdf"
res="${{ steps.include_exclude.outputs.sync_result }}"
[ "$sol" = "$res" ] || { echo "::error::Failed include_exclude test"; exit 1; }
test_actual_push:
name: Test push to own wiki on tmp branch
runs-on: ubuntu-latest
steps:
- name: Checkout current version
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Create tmp file
run: |
mkdir -p tmp/
rm -f tmp/*.action.tmp
mktemp tempfileXXXXXXXX --suffix=.action.tmp --tmpdir=./tmp/
ls tmp
- name: Push with local action
uses: ./
with:
source-directory: "./tmp/"
branch: "test_push_to_branch"
include-patterns: "*.action.tmp"
11 changes: 11 additions & 0 deletions .github/workflows/update_major_tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
on:
release:
types: [ published, edited ]

jobs:
actions-tagger:
runs-on: ubuntu-latest
steps:
- uses: Actions-R-Us/actions-tagger@latest
env:
GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}"
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.devcontainer/
example_a/
external-repo-sync-action.wiki/
todo
.actrc
tmp/
venv/
.vscode/
.env
Loading

0 comments on commit 4ccf69a

Please sign in to comment.