Skip to content

Commit 99cdb9e

Browse files
authored
Update Test and README.md (#3)
1 parent db76ce2 commit 99cdb9e

File tree

5 files changed

+29
-36
lines changed

5 files changed

+29
-36
lines changed

.github/workflows/test.yaml

+17-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: "Test"
22

3+
# NOTE: Job test mirror's the action so there is no mirror.yaml workflow...
4+
35
on:
46
workflow_dispatch:
57
release:
@@ -31,18 +33,18 @@ jobs:
3133
create: true
3234
username: shaner
3335
password: ${{ secrets.CODEBERG_TOKEN }}
34-
#
35-
# lint:
36-
# name: "Lint"
37-
# runs-on: ubuntu-latest
38-
# timeout-minutes: 5
39-
#
40-
# steps:
41-
# - name: "Checkout"
42-
# uses: actions/checkout@v4
43-
#
44-
# - name: "Run ShellCheck"
45-
# uses: ludeeus/[email protected]
46-
# with:
47-
# check_together: "yes"
48-
# SHELLCHECK_OPTS: "-e SC1091 -e SC2034"
36+
37+
lint:
38+
name: "Lint"
39+
runs-on: ubuntu-latest
40+
timeout-minutes: 5
41+
42+
steps:
43+
- name: "Checkout"
44+
uses: actions/checkout@v4
45+
46+
- name: "Run ShellCheck"
47+
uses: ludeeus/[email protected]
48+
with:
49+
scandir: "src"
50+
check_together: "yes"

.prettierrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
},
1212
{
13-
"files": ["**/*.js"],
13+
"files": ["**/*.js", "**/*.css", "**/*.scss"],
1414
"options": {
1515
"tabWidth": 4
1616
}

README.md

+10-18
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
Mirror Git Repository to Remote Host.
1414

1515
- [Inputs](#Inputs)
16+
- [Setup Instructions](#Setup-Instructions)
17+
- [Example](#Example)
1618
- [Support](#Support)
1719
- [Contributing](#Contributing)
18-
- [Development](#Development)
1920

2021
## Inputs
2122

@@ -31,16 +32,19 @@ Mirror Git Repository to Remote Host.
3132

3233
**url/host** - You must provide either a full repository `url` or a `host` value.
3334

34-
**owner/repo** - If different from source, you must specify these values.
35+
**owner/repo** - If different from source, you must specify these values (overridden by `url`).
3536

3637
**create** - Tested with codeberg but should also work with gitea/forgejo. Do not set or leave empty to disable.
3738

39+
## Setup Instructions
40+
3841
1. Create a Token for Mirror to use as a Password for Pushing Commits, or Creating Repositories.
3942

4043
- Codeberg/Gitea/Forgejo go here: https://codeberg.org/user/settings/applications
4144
- Select Permissions: `write:organization` `write:repository` `write:user`
4245

4346
2. Create Remote Repository to Mirror, or set `create` to `true`, for example: `https://codeberg.org`
47+
4448
3. Go to the settings for your source repository on GitHub and add the `CODEBERG_TOKEN` secret.
4549

4650
- For organizations, you can add the token one time at the Organization level.
@@ -51,6 +55,8 @@ Mirror Git Repository to Remote Host.
5155
- The `repo` is automatically set to the GitHub Repository Name. This should only be set to rename repo.
5256
- For Codeberg, use the `host` below and set the `username` to your Codeberg username.
5357

58+
## Example
59+
5460
The below yaml is available in this file: [.github/workflows/mirror.yaml](mirror.yaml)
5561

5662
```yaml
@@ -77,7 +83,7 @@ jobs:
7783
fetch-depth: 0
7884

7985
- name: 'Mirror to Codeberg'
80-
uses: cssnr/mirror-repository-action@master
86+
uses: cssnr/mirror-repository-action@v1
8187
with:
8288
#url: https://codeberg.org/cssnr/mirror-repository-action
8389
host: https://codeberg.org
@@ -116,22 +122,8 @@ Additionally, you can support other GitHub Actions I have published:
116122
- [Update JSON Value Action](https://github.com/cssnr/update-json-value-action)
117123
- [Parse Issue Form Action](https://github.com/cssnr/parse-issue-form-action)
118124
- [Mirror Repository Action](https://github.com/cssnr/mirror-repository-action)
125+
- [Stack Deploy Action](https://github.com/cssnr/stack-deploy-action)
119126
- [Portainer Stack Deploy](https://github.com/cssnr/portainer-stack-deploy-action)
120127
- [Mozilla Addon Update Action](https://github.com/cssnr/mozilla-addon-update-action)
121128

122129
For a full list of current projects to support visit: [https://cssnr.github.io/](https://cssnr.github.io/)
123-
124-
# Development
125-
126-
1. Install `act`: https://nektosact.com/installation/index.html
127-
2. List Workflows: `act -l`
128-
3. Run a Workflow: `act -j test`
129-
130-
If you need files from .gitignore use: `--use-gitignore=false`
131-
132-
For advanced using with things like secrets, variables and context see: https://nektosact.com/usage/index.html
133-
134-
You should also review the options from `act --help`
135-
136-
Note, the `.env`, `.secrets` and `.vars` files are automatically sourced with no extra options.
137-
To source `event.json` you need to run act with `act -e event.json`

mirror.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
fetch-depth: 0
2222

2323
- name: "Mirror to Codeberg"
24-
uses: cssnr/mirror-repository-action@master
24+
uses: cssnr/mirror-repository-action@v1
2525
with:
2626
#url: https://codeberg.org/cssnr/mirror-repository-action
2727
host: https://codeberg.org

src/codeberg.sh

-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,3 @@ curl -X POST \
3131
-H "Content-Type: application/json" \
3232
-d "${BODY}" \
3333
"${URL}"
34-

0 commit comments

Comments
 (0)