Skip to content

Commit

Permalink
Add Mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
smashedr committed Sep 29, 2024
1 parent 35f2c5b commit 2f409e7
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 12 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/mirror.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Mirror"

on:
workflow_dispatch:
release:
types: ["published"]
push:
branches: ["**"]
tags: ["**"]

jobs:
mirror:
name: "Mirror"
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "Mirror to Codeberg"
uses: cssnr/mirror-repository-action@master
with:
#url: https://codeberg.org/cssnr/mirror-repository-action
host: https://codeberg.org
#owner: cssnr
#repo: mirror-repository-action
create: true
username: cssnr
password: ${{ secrets.CODEBERG_TOKEN }}
5 changes: 2 additions & 3 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"semi": false,
"singleQuote": true,
"overrides": [
Expand All @@ -11,9 +10,9 @@
}
},
{
"files": ["**/*.json", "**/*.yaml", "**/*.yml"],
"files": ["**/*.js"],
"options": {
"tabWidth": 2
"tabWidth": 4
}
}
]
Expand Down
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=cssnr_env-json-action&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=cssnr_env-json-action)
[![GitHub Release Version](https://img.shields.io/github/v/release/cssnr/env-json-action?logo=github)](https://github.com/cssnr/env-json-action/releases/latest)
[![GitHub Last Commit](https://img.shields.io/github/last-commit/cssnr/env-json-action?logo=github&logoColor=white&label=updated)](https://github.com/cssnr/env-json-action/graphs/commit-activity)
[![Codeberg Last Commit](https://img.shields.io/gitea/last-commit/cssnr/env-json-action/master?gitea_url=https%3A%2F%2Fcodeberg.org%2F&logo=codeberg&logoColor=white&label=updated)](https://codeberg.org/cssnr/env-json-action)
[![GitHub Top Language](https://img.shields.io/github/languages/top/cssnr/env-json-action?logo=htmx&logoColor=white)](https://github.com/cssnr/env-json-action)
[![GitHub Org Stars](https://img.shields.io/github/stars/cssnr?style=flat&logo=github&logoColor=white)](https://cssnr.github.io/)
[![Discord](https://img.shields.io/discord/899171661457293343?logo=discord&logoColor=white&label=discord&color=7289da)](https://discord.gg/wXy6m2X8wY)
Expand All @@ -11,11 +12,11 @@

Convert Environment File to/from a JSON File. Creates an output with the results and optionally writes to a file.

* [Inputs](#Inputs)
* [Outputs](#Outputs)
* [Examples](#Examples)
* [Support](#Support)
* [Contributing](#Contributing)
- [Inputs](#Inputs)
- [Outputs](#Outputs)
- [Examples](#Examples)
- [Support](#Support)
- [Contributing](#Contributing)

> [!NOTE]
> Please submit
Expand All @@ -25,9 +26,9 @@ Convert Environment File to/from a JSON File. Creates an output with the results
## Inputs

| input | required | default | description |
|--------|----------|---------|--------------------------------------|
| ------ | -------- | ------- | ------------------------------------ |
| source | Yes | - | Environment or JSON Source File Path |
| type | No | `json` | Output type [`json`, `env`] * |
| type | No | `json` | Output type [`json`, `env`] \* |
| dest | No | - | Optional Output File to Write to |

**type** - By default this converts .env to json. To perform json to .env, use type `env`.
Expand All @@ -40,15 +41,15 @@ Convert Environment File to/from a JSON File. Creates an output with the results
## Outputs
| output | description |
|--------|-----------------------------|
| ------ | --------------------------- |
| result | JSON or Environment Results |
```yaml
- name: 'Parse Environment'
id: parse
uses: cssnr/env-json-action@master

- name: "Echo Result"
- name: 'Echo Result'
run: echo '${{ steps.parse.outputs.result }}'
```
Expand Down Expand Up @@ -80,6 +81,7 @@ Additionally, you can support other GitHub Actions I have published:
- [Update Version Tags Action](https://github.com/cssnr/update-version-tags-action)
- [Update JSON Value Action](https://github.com/cssnr/update-json-value-action)
- [Parse Issue Form Action](https://github.com/cssnr/parse-issue-form-action)
- [Mirror Repository Action](https://github.com/cssnr/mirror-repository-action)
- [Portainer Stack Deploy](https://github.com/cssnr/portainer-stack-deploy-action)
- [Mozilla Addon Update Action](https://github.com/cssnr/mozilla-addon-update-action)

Expand Down

0 comments on commit 2f409e7

Please sign in to comment.