generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from github/update-workflows
Update all Actions Workflows
- Loading branch information
Showing
4 changed files
with
40 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: "CodeQL" | ||
name: CodeQL | ||
|
||
on: | ||
push: | ||
|
@@ -25,8 +25,8 @@ jobs: | |
language: [ 'javascript' ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: checkout | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # [email protected] | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,14 +10,20 @@ jobs: | |
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3.0.2 | ||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0 | ||
|
||
- uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 # pin@v3 | ||
# check the node version from the .node-version file | ||
- name: fetch node version | ||
id: node-version | ||
run: | | ||
version=$(cat .node-version) | ||
echo "version=${version}" >> $GITHUB_OUTPUT | ||
- name: setup node | ||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # [email protected] | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
node-version: ${{ steps.node-version.outputs.version }} | ||
cache: 'npm' | ||
|
||
- name: install dependencies | ||
run: npm ci | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,15 +12,22 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # pin@v2 | ||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0 | ||
|
||
- name: Setup Node.js 18.x | ||
uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 # [email protected] | ||
# check the node version from the .node-version file | ||
- name: fetch node version | ||
id: node-version | ||
run: | | ||
version=$(cat .node-version) | ||
echo "version=${version}" >> $GITHUB_OUTPUT | ||
- name: setup node | ||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # [email protected] | ||
with: | ||
node-version: 18.x | ||
node-version: ${{ steps.node-version.outputs.version }} | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
- name: install dependencies | ||
run: npm ci | ||
|
||
- name: Rebuild the dist/ directory | ||
|
@@ -36,7 +43,7 @@ jobs: | |
id: diff | ||
|
||
# If index.js was different than expected, upload the expected version as an artifact | ||
- uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # pin@v2 | ||
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin@v3.1.2 | ||
if: ${{ failure() && steps.diff.conclusion == 'failure' }} | ||
with: | ||
name: dist | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,14 +10,20 @@ jobs: | |
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3.0.2 | ||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0 | ||
|
||
- uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 # pin@v3 | ||
# check the node version from the .node-version file | ||
- name: fetch node version | ||
id: node-version | ||
run: | | ||
version=$(cat .node-version) | ||
echo "version=${version}" >> $GITHUB_OUTPUT | ||
- name: setup node | ||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # [email protected] | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
node-version: ${{ steps.node-version.outputs.version }} | ||
cache: 'npm' | ||
|
||
- name: install dependencies | ||
run: npm ci | ||
|