-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Test * Add Badge * Update Output * Add setup.cfg * Update Output * Update README.md
- Loading branch information
Showing
4 changed files
with
87 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: "Test" | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- "src/**" | ||
|
||
jobs: | ||
test: | ||
name: "Test" | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Create JSON" | ||
uses: jsdaniell/[email protected] | ||
with: | ||
name: "update.json" | ||
json: '{"addons":{"test-id":{"updates":[]}}}' | ||
|
||
- name: "Test Local Action" | ||
id: test | ||
uses: ./ | ||
with: | ||
url: https://example.com/{version} | ||
version: 1.0.0 | ||
addon_id: test-id | ||
|
||
- name: "Validate Outputs" | ||
env: | ||
JSON: '{"addons": {"test-id": {"updates": [{"version": "1.0.0", "update_link": "https://example.com/1.0.0"}]}}}' | ||
run: | | ||
echo '${{ steps.test.outputs.url }}' | ||
if [ '${{ steps.test.outputs.url }}' != 'https://example.com/1.0.0' ];then | ||
echo "Invalid Output URL" | ||
exit 1 | ||
fi | ||
echo '${{ steps.test.outputs.result }}' | ||
if [ '${{ steps.test.outputs.result }}' != '${{ env.JSON }}' ];then | ||
echo "Invalid Output Result" | ||
exit 1 | ||
fi | ||
lint: | ||
name: "Lint" | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Setup Python" | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: "Flake8" | ||
run: | | ||
python -m pip install flake8 | ||
flake8 src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
[![Tags](https://img.shields.io/github/actions/workflow/status/cssnr/mozilla-addon-update-action/tags.yaml?logo=github&logoColor=white&label=tags)](https://github.com/cssnr/mozilla-addon-update-action/actions/workflows/tags.yaml) | ||
[![Test](https://img.shields.io/github/actions/workflow/status/cssnr/mozilla-addon-update-action/test.yaml?logo=github&logoColor=white&label=test)](https://github.com/cssnr/mozilla-addon-update-action/actions/workflows/test.yaml) | ||
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=cssnr_mozilla-addon-update-action&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=cssnr_mozilla-addon-update-action) | ||
[![GitHub Release Version](https://img.shields.io/github/v/release/cssnr/mozilla-addon-update-action?logo=github)](https://github.com/cssnr/mozilla-addon-update-action/releases/latest) | ||
[![GitHub Last Commit](https://img.shields.io/github/last-commit/cssnr/parse-issue-form-action?logo=github&logoColor=white&label=updated)](https://github.com/cssnr/parse-issue-form-action/graphs/commit-activity) | ||
[![GitHub Top Language](https://img.shields.io/github/languages/top/cssnr/mozilla-addon-update-action?logo=htmx&logoColor=white)](https://github.com/cssnr/mozilla-addon-update-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) | ||
|
@@ -47,6 +49,19 @@ the `manfiest` key: `browser_specific_settings.gecko.id` | |
| url | Update URL Result | | ||
| result | Update JSON Result | | ||
```yaml | ||
- name: "Mozilla Addon Update" | ||
id: update | ||
uses: cssnr/mozilla-addon-update-action@v1 | ||
with: | ||
url: "https://github.com/cssnr/link-extractor/releases/download/{version}/link_extractor-firefox.xpi" | ||
|
||
- name: "Echo Outputs" | ||
run: | | ||
echo '${{ steps.update.outputs.url }}' | ||
echo '${{ steps.update.outputs.result }}' | ||
``` | ||
## Notes | ||
This action expects the `input_update` JSON file to exist, be valid JSON and have a matching addon_id entry. | ||
|
@@ -81,26 +96,6 @@ Basic Example with All Inputs: | |
addon_id: [email protected] | ||
``` | ||
|
||
Use Outputs: | ||
|
||
```yaml | ||
- name: "Mozilla Addon Update" | ||
id: update | ||
uses: cssnr/mozilla-addon-update-action@v1 | ||
with: | ||
url: "https://github.com/cssnr/link-extractor/releases/download/{version}/link_extractor-firefox.xpi" | ||
update: update.json | ||
manifest: manifest.json | ||
version: "1.0.0" | ||
addon_id: [email protected] | ||
- name: "Echo Outputs" | ||
run: | | ||
echo '${{ steps.update.outputs.url }}' | ||
echo '${{ steps.update.outputs.result }}' | ||
``` | ||
|
||
Simple Example: | ||
|
||
```yaml | ||
|
@@ -198,12 +193,12 @@ https://github.com/cssnr/aviation-tools/blob/master/.github/workflows/build.yaml | |
|
||
For general help or to request a feature see: | ||
|
||
- Q&A Discussion: https://github.com/cssnr/virustotal-action/discussions/categories/q-a | ||
- Request a Feature: https://github.com/cssnr/virustotal-action/discussions/categories/feature-requests | ||
- Q&A Discussion: https://github.com/cssnr/mozilla-addon-update-action/discussions/categories/q-a | ||
- Request a Feature: https://github.com/cssnr/mozilla-addon-update-action/discussions/categories/feature-requests | ||
|
||
If you are experiencing an issue/bug or getting unexpected results you can: | ||
|
||
- Report an Issue: https://github.com/cssnr/virustotal-action/issues | ||
- Report an Issue: https://github.com/cssnr/mozilla-addon-update-action/issues | ||
- Chat with us on Discord: https://discord.gg/wXy6m2X8wY | ||
- Provide General | ||
Feedback: [https://cssnr.github.io/feedback/](https://cssnr.github.io/feedback/?app=Mozilla%20Addon%20Update) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[flake8] | ||
max-line-length = 119 | ||
exclude = venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters