mirror of
https://github.com/fawazahmed0/exchange-api.git
synced 2025-06-30 10:33:50 +00:00
Update run.yml
This commit is contained in:
parent
fa91b18144
commit
d668898c5b
38
.github/workflows/run.yml
vendored
38
.github/workflows/run.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Fetch-Currencies
|
name: Publish-Currencies
|
||||||
|
|
||||||
# Controls when the action will run. Triggers the workflow on push or pull request
|
# Controls when the action will run. Triggers the workflow on push or pull request
|
||||||
# events but only for branch 1 and on start directory, command.txt file changes or by manually running the workflow from actions tab
|
# events but only for branch 1 and on start directory, command.txt file changes or by manually running the workflow from actions tab
|
||||||
@ -20,47 +20,35 @@ jobs:
|
|||||||
# This workflow contains a single job called "build"
|
# This workflow contains a single job called "build"
|
||||||
build:
|
build:
|
||||||
# The type of runner that the job will run on
|
# The type of runner that the job will run on
|
||||||
runs-on: macos-13
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
# Partial clone
|
- uses: actions/checkout@v4
|
||||||
- name: Partial clone
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
REPO="https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
|
|
||||||
git clone --filter=blob:none --no-checkout --depth 1 --sparse $REPO .
|
|
||||||
git sparse-checkout reapply --no-cone
|
|
||||||
git sparse-checkout add 'latest/*'
|
|
||||||
git checkout
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '20.5.1'
|
node-version: '21.6.2'
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
npm i
|
npm i
|
||||||
npx playwright install --with-deps
|
npx playwright install --with-deps
|
||||||
|
|
||||||
|
|
||||||
- name: Running the command
|
- name: Running the command
|
||||||
run: node currscript.js
|
run: node currscript.js
|
||||||
|
|
||||||
- name: Rerun the command if previous failed
|
- name: Rerun the command if previous failed
|
||||||
if: failure()
|
if: failure()
|
||||||
id: rerun
|
|
||||||
run: node currscript.js
|
run: node currscript.js
|
||||||
|
|
||||||
# commiting and pushing changes
|
- name: Generate tarball
|
||||||
- name: commit and push
|
|
||||||
if: ${{ success() || steps.rerun.conclusion == 'failure' }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email github-actions@github.com
|
|
||||||
git config --global user.name github-actions
|
|
||||||
git pull
|
- name: publish
|
||||||
git add --sparse -A
|
run: npm publish
|
||||||
git commit -m 'Update Currencies'
|
env:
|
||||||
git push
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
Loading…
Reference in New Issue
Block a user