Skip to content

ci: Add comment showing lastUpdated time for icons #54

ci: Add comment showing lastUpdated time for icons

ci: Add comment showing lastUpdated time for icons #54

Workflow file for this run

name: CI - Pull Request
on: pull_request
env:
FIGMA_ACCESS_TOKEN: ${{secrets.FIGMA_PERSONAL_ACCESS_TOKEN}}
jobs:
compile_js_modules:
name: Compile JS Modules
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: "https://registry.npmjs.org"
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{github.head_ref}}
- name: Install packages
run: npm ci
- name: Run tests
run: npm run test
- name: Get lastUpdated from package.json
id: lastUpdated
run: echo "lastUpdated=${{cat package.json | jq .lastUpdated}}" >> $GITHUB_OUTPUT

Check failure on line 27 in .github/workflows/on-pr.yml

View workflow run for this annotation

GitHub Actions / CI - Pull Request

Invalid workflow file

The workflow is not valid. .github/workflows/on-pr.yml (Line: 27, Col: 14): Unrecognized named-value: 'cat'. Located at position 1 within expression: cat package.json | jq .lastUpdated .github/workflows/on-pr.yml (Line: 40, Col: 9): 'name' is already defined
# - name: Comment
# if: ${{steps.lastUpdated.outputs.lastUpdated}}
# uses: actions/github-script
# with:
# github-token: ${{secrets.GITHUB_TOKEN}}
# script: |
# github.rest.issues.createComment({
# issue_number: context.issue.number,
# owner: context.repo.owner,
# repo: context.repo.repo,
# body: 'PR is ready to merge. Last updated: ${{steps.lastUpdated.outputs.lastUpdated}}'
# })
name: Comment
uses: mikedloss/create-update-comment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
unique-identifier: "lastUpdated comment"
message: |
## PR is ready to merge.
Last updated: ${{steps.lastUpdated.outputs.lastUpdated}}