13
13
Mirror Git Repository to Remote Host.
14
14
15
15
- [ Inputs] ( #Inputs )
16
+ - [ Setup Instructions] ( #Setup-Instructions )
17
+ - [ Example] ( #Example )
16
18
- [ Support] ( #Support )
17
19
- [ Contributing] ( #Contributing )
18
- - [ Development] ( #Development )
19
20
20
21
## Inputs
21
22
@@ -31,16 +32,19 @@ Mirror Git Repository to Remote Host.
31
32
32
33
** url/host** - You must provide either a full repository ` url ` or a ` host ` value.
33
34
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 ` ) .
35
36
36
37
** create** - Tested with codeberg but should also work with gitea/forgejo. Do not set or leave empty to disable.
37
38
39
+ ## Setup Instructions
40
+
38
41
1 . Create a Token for Mirror to use as a Password for Pushing Commits, or Creating Repositories.
39
42
40
43
- Codeberg/Gitea/Forgejo go here: https://codeberg.org/user/settings/applications
41
44
- Select Permissions: ` write:organization ` ` write:repository ` ` write:user `
42
45
43
46
2 . Create Remote Repository to Mirror, or set ` create ` to ` true ` , for example: ` https://codeberg.org `
47
+
44
48
3 . Go to the settings for your source repository on GitHub and add the ` CODEBERG_TOKEN ` secret.
45
49
46
50
- For organizations, you can add the token one time at the Organization level.
@@ -51,6 +55,8 @@ Mirror Git Repository to Remote Host.
51
55
- The ` repo ` is automatically set to the GitHub Repository Name. This should only be set to rename repo.
52
56
- For Codeberg, use the ` host ` below and set the ` username ` to your Codeberg username.
53
57
58
+ ## Example
59
+
54
60
The below yaml is available in this file: [ .github/workflows/mirror.yaml] ( mirror.yaml )
55
61
56
62
``` yaml
77
83
fetch-depth : 0
78
84
79
85
- name : ' Mirror to Codeberg'
80
- uses : cssnr/mirror-repository-action@master
86
+ uses : cssnr/mirror-repository-action@v1
81
87
with :
82
88
# url: https://codeberg.org/cssnr/mirror-repository-action
83
89
host : https://codeberg.org
@@ -116,22 +122,8 @@ Additionally, you can support other GitHub Actions I have published:
116
122
- [Update JSON Value Action](https://github.com/cssnr/update-json-value-action)
117
123
- [Parse Issue Form Action](https://github.com/cssnr/parse-issue-form-action)
118
124
- [Mirror Repository Action](https://github.com/cssnr/mirror-repository-action)
125
+ - [Stack Deploy Action](https://github.com/cssnr/stack-deploy-action)
119
126
- [Portainer Stack Deploy](https://github.com/cssnr/portainer-stack-deploy-action)
120
127
- [Mozilla Addon Update Action](https://github.com/cssnr/mozilla-addon-update-action)
121
128
122
129
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`
0 commit comments