Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sensuikan1973/replace-deps
use latest dependencies in specific extension all files
https://github.com/sensuikan1973/replace-deps
firebase github-actions html javascript
Last synced: 11 days ago
JSON representation
use latest dependencies in specific extension all files
- Host: GitHub
- URL: https://github.com/sensuikan1973/replace-deps
- Owner: sensuikan1973
- License: apache-2.0
- Created: 2020-06-15T00:13:17.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-08T23:06:33.000Z (about 1 month ago)
- Last Synced: 2024-10-10T16:18:46.024Z (29 days ago)
- Topics: firebase, github-actions, html, javascript
- Language: TypeScript
- Homepage: https://github.com/marketplace/actions/replace-deps
- Size: 955 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# replace-deps
replace dependencies in specific extension all files.This is typically used to update JS dependencies in HTML, included using a `` tag.
result image:
![image](https://user-images.githubusercontent.com/23427957/84658170-6f6ed380-af50-11ea-98c6-caa662f0e512.png)inspired by [GCP/repository-gardener](https://github.com/GoogleCloudPlatform/repository-gardener/blob/master/use-latest-deps-html.sh).
## example
### create PR cron to update firebase js sdk in all html files
```.yaml
on:
schedule:
- cron: '0 0 * * *'jobs:
update_deps_sample:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: fetch latest version
run: echo '::set-env LATEST_VERSION=$(npm show firebase version)'
- name: use latest firebase js sdk in all html files
uses: sensuikan1973/replace-deps@main
with:
extension: 'html'
regex: 'firebasejs/[0-9]*\.[0-9]*\.[0-9]*/'
replacement: "firebasejs/${{ env.LATEST_VERSION }}/"
- name: create PR
uses: peter-evans/create-pull-request@v2
with:
branch: cron_update_firebase_js_sdk_in_html
base: master
token: ${{ secrets.XXX_TOKEN }}
```---
## development
### versioning
https://github.com/actions/toolkit/blob/master/docs/action-versioning.md#recommendations