Skip to content

update-reference

update-reference #171

name: update-reference
on:
schedule:
- cron: '0 0 * * 0'
jobs:
update-reference:
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.push.outputs.changed }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '^1.16'
- uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- run: go run cmd/scrape-authref/scrape.go
- id: commit
continue-on-error: true
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add service-auth.json
git commit -m "New update to service-auth.json"
- id: push
if: ${{ steps.commit.outcome == 'success' }}
run: |
npm --no-git-tag-version version patch
git add package.json
git commit --amend --no-edit
git push
npm publish
echo "::set-output name=changed::yes"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}