Skip to content

Use node16 for running action #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,3 @@ updates:
directory: /
schedule:
interval: weekly
ignore:
- dependency-name: '@types/node'

- package-ecosystem: docker
directory: /
schedule:
interval: weekly
61 changes: 15 additions & 46 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,32 @@ env:
CI: true

jobs:
lint-build:
lint-build-test:
runs-on: ubuntu-20.04
steps:
-
name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v3.4.0

-
uses: actions/setup-node@v3
uses: actions/setup-node@v3.6.0
with:
node-version: 16
cache: yarn

- name: Cache node_modules
id: cache-node_modules
uses: actions/cache@v3.3.1
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-
${{ runner.os }}-

-
name: Install dependencies
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: |
yarn install --frozen-lockfile

Expand All @@ -40,47 +51,6 @@ jobs:
run: |
yarn build

test-local-action:
runs-on: ubuntu-20.04

steps:
-
name: Checkout code
uses: actions/checkout@v3

-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2.5.0

-
name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-dockerfile-${{ hashFiles('**/Dockerfile') }}
restore-keys: |
${{ runner.os }}-buildx-dockerfile-
${{ runner.os }}-buildx-

-
name: Build Docker Image
id: build-docker-image
uses: docker/build-push-action@v4.0.0
with:
builder: ${{ steps.buildx.outputs.name }}
push: false
load: true
tags: ghcr.io/dailydotdev/action-devcard:${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new

-
name: Modify action.yaml
run: |
sed -E 's|(docker://ghcr\.io/dailydotdev/action-devcard):[0-9\.]+|\1:${{ github.sha }}|i' action.yml > local-action.yml
mv -f local-action.yml action.yml

-
name: devcard.svg
uses: ./
Expand All @@ -101,6 +71,5 @@ jobs:

dependabot:
needs:
- lint-build
- test-local-action
- lint-build-test
uses: ./.github/workflows/dependabot-automerge.yaml
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.14.2
v16
33 changes: 0 additions & 33 deletions Dockerfile

This file was deleted.

4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ inputs:
required: false

runs:
using: 'docker'
image: 'docker://ghcr.io/dailydotdev/action-devcard:2.1.0'
using: 'node16'
main: "dist/index.js"
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {
"lint": "eslint 'src/**/*.ts' --cache",
"build": "ncc build --out dist --target es2020 --license license.txt src/index.ts"
"build": "ncc build --out dist --target es2023 --minify --license license.txt src/index.ts"
},
"main": "src/index.ts",
"repository": "github:dailydotdev/action-devcard",
Expand All @@ -32,7 +32,7 @@
},
"devDependencies": {
"@types/jsdom": "21.x",
"@types/node": "18.x",
"@types/node": "16.x",
"@types/sharp": "0.31.x",
"@types/uuid": "9.x",
"@typescript-eslint/eslint-plugin": "^5.56.0",
Expand Down
7 changes: 6 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,16 @@
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3"
integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==

"@types/node@*", "@types/node@18.x":
"@types/node@*":
version "18.15.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.7.tgz#33514fca9bdf136f77027358850c0fb9cd93c669"
integrity sha512-LFmUbFunqmBn26wJZgZPYZPrDR1RwGOu2v79Mgcka1ndO6V0/cwjivPTc4yoK6n9kmw4/ls1r8cLrvh2iMibFA==

"@types/node@16.x":
version "16.18.21"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.21.tgz#061e3b51668f74bf3aaa44450dcf0acd625841f7"
integrity sha512-TassPGd0AEZWA10qcNnXnSNwHlLfSth8XwUaWc3gTSDmBz/rKb613Qw5qRf6o2fdRBrLbsgeC9PMZshobkuUqg==

"@types/semver@^7.3.12":
version "7.3.13"
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91"
Expand Down