Skip to content

chore: update to only build #23

chore: update to only build

chore: update to only build #23

name: Run build and update PR for dependabot PRs
on:
pull_request:
types: [opened, synchronize]
permissions:
contents: write
pull-requests: read
defaults:
run:
shell: bash
jobs:
update-dependencies:
if: ${{ github.actor == 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:

Check failure on line 19 in .github/workflows/dependabot-build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/dependabot-build.yml

Invalid workflow file

You have an error in your yaml syntax on line 19
- name: Fetch Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@dbb049abf0d677abbd7f7eee0375145b417fdd34 #v2.2.0
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 #v4.2.1
if: ${{ steps.dependabot-metadata.outputs.package-ecosystem == 'npm_and_yarn' }}
with:
ref: ${{ github.head_ref }}
- name: Set up Node.js
if: ${{ steps.dependabot-metadata.outputs.package-ecosystem == 'npm_and_yarn' }}
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 #v4.0.4
with:
node-version-file: package.json
- name: Install dependencies
if: ${{ steps.dependabot-metadata.outputs.package-ecosystem == 'npm_and_yarn' }}
run: npm ci
- name: Run build
if: ${{ steps.dependabot-metadata.outputs.package-ecosystem == 'npm_and_yarn' }}
run: |
npm run build
- name: Commit and push if it changed
run: |-
git config user.name "Anchore Automated"
git config user.email "actions@users.noreply.github.com"
git add -A
timestamp=$(date -u)
git commit --signoff -m "Latest build: ${timestamp}" || exit 0
git push