diff --git a/.github/workflows/dev-image.yml b/.github/workflows/dev-image.yml deleted file mode 100644 index 70fd6bf..0000000 --- a/.github/workflows/dev-image.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: 'Dev Image CI' - -on: - workflow_dispatch: - schedule: - - cron: '11 11 * * *' - push: - branches: - - main - paths: - - '.github/workflows/dev-image.yml' - - '.dockerignore' - - '.nvmrc' - - 'Dockerfile' - - 'Makefile' - - 'docker-compose.yml' - pull_request: - paths: - - '.github/workflows/dev-image.yml' - - '.dockerignore' - - '.nvmrc' - - 'Dockerfile' - - 'Makefile' - - 'docker-compose.yml' - -jobs: - dev-image-test: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - - name: Login to Packages - run: echo '${{ secrets.GITHUB_TOKEN }}' | docker login 'docker.pkg.github.com' -u 'peaceiris' --password-stdin - - run: docker-compose pull --quiet - if: ${{ github.event_name == 'pull_request' }} - - run: make build - - run: docker images - - run: docker-compose push - if: ${{ github.ref == 'refs/heads/main' && github.event.repository.fork == false }} diff --git a/.nvmrc b/.nvmrc index 87378bf..94f5f26 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -12.22.10 +16.18.0 diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 29040d4..0000000 --- a/Dockerfile +++ /dev/null @@ -1,56 +0,0 @@ -FROM ubuntu:18.04 - -SHELL ["/bin/bash", "-l", "-c"] - -RUN apt-get update && \ - apt-get install -y --no-install-recommends software-properties-common gnupg && \ - add-apt-repository ppa:git-core/ppa && \ - apt-get update && \ - apt-get install -y --no-install-recommends \ - git \ - curl \ - wget \ - ssh \ - vim && \ - apt-get autoclean && \ - apt-get clean && \ - apt-get autoremove -y && \ - rm -rf /var/lib/apt/lists/* - -RUN git --version && \ - git config --global init.defaultBranch main && \ - git config --global init.defaultBranch - -WORKDIR /node -ARG NODE_VERSION -RUN curl -o nodejs.deb "https://deb.nodesource.com/node_${NODE_VERSION%%.*}.x/pool/main/n/nodejs/nodejs_${NODE_VERSION}-1nodesource1_amd64.deb" && \ - apt-get update && \ - apt-get install -y --no-install-recommends ./nodejs.deb && \ - npm config set user 0 && \ - npm config set unsafe-perm true && \ - npm i -g npm && \ - curl -sL https://deb.nodesource.com/test | bash - && \ - npm cache clean --force && \ - rm -rf /var/lib/apt/lists/* && \ - rm -rf /node - -WORKDIR /repo - -ENV DEBIAN_FRONTEND="noninteractive" -ENV LANG="C.UTF-8" -ENV CI="true" -ENV ImageVersion="20200717.1" -ENV GITHUB_SERVER_URL="https://github.com" -ENV GITHUB_API_URL="https://api.github.com" -ENV GITHUB_GRAPHQL_URL="https://api.github.com/graphql" -ENV GITHUB_REPOSITORY_OWNER="peaceiris" -ENV GITHUB_ACTIONS="true" -ENV GITHUB_ACTOR="peaceiris" -ENV GITHUB_REPOSITORY="actions/pages" -ENV RUNNER_OS="Linux" -ENV RUNNER_TOOL_CACHE="/opt/hostedtoolcache" -ENV RUNNER_USER="runner" -ENV RUNNER_TEMP="/home/runner/work/_temp" -ENV RUNNER_WORKSPACE="/home/runner/work/pages" - -CMD [ "bash" ] diff --git a/Makefile b/Makefile deleted file mode 100644 index b75222d..0000000 --- a/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -IMAGE_NAME := docker.pkg.github.com/peaceiris/actions-gh-pages/dev:latest -NODE_VERSION := $(shell cat ./.nvmrc) - -.PHONY: build -build: - docker-compose build --build-arg NODE_VERSION=$(NODE_VERSION) - -.PHONY: run -run: - docker-compose run --rm dev bash diff --git a/README.md b/README.md index 0ab0c48..181f98b 100644 --- a/README.md +++ b/README.md @@ -504,17 +504,15 @@ jobs: id: prepare_tag if: startsWith(github.ref, 'refs/tags/') run: | - TAG_NAME="${GITHUB_REF##refs/tags/}" - echo "::set-output name=tag_name::${TAG_NAME}" - echo "::set-output name=deploy_tag_name::deploy-${TAG_NAME}" + echo "DEPLOY_TAG_NAME=deploy-${TAG_NAME}" >> "${GITHUB_OUTPUT}" - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./public - tag_name: ${{ steps.prepare_tag.outputs.deploy_tag_name }} - tag_message: 'Deployment ${{ steps.prepare_tag.outputs.tag_name }}' + tag_name: ${{ steps.prepare_tag.outputs.DEPLOY_TAG_NAME }} + tag_message: 'Deployment ${{ github.ref_name }}' ``` Commands on a local machine. @@ -698,7 +696,7 @@ jobs: node-version: '14' - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} @@ -748,7 +746,7 @@ jobs: node-version: '14' - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} @@ -801,12 +799,12 @@ jobs: - name: Get yarn cache id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "YARN_CACHE_DIR=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: - path: ${{ steps.yarn-cache.outputs.dir }} + path: ${{ steps.yarn-cache.outputs.YARN_CACHE_DIR }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- @@ -857,7 +855,7 @@ jobs: node-version: '14' - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} @@ -916,12 +914,12 @@ jobs: - name: Get yarn cache id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "YARN_CACHE_DIR=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: - path: ${{ steps.yarn-cache.outputs.dir }} + path: ${{ steps.yarn-cache.outputs.YARN_CACHE_DIR }} key: ${{ runner.os }}-website-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-website- @@ -981,7 +979,7 @@ jobs: run: echo "::set-output name=dir::$(pip cache dir)" - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ steps.pip-cache.outputs.dir }} key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} @@ -1168,7 +1166,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: | ~/Publish_build diff --git a/action.yml b/action.yml index 14ad067..70e310a 100644 --- a/action.yml +++ b/action.yml @@ -2,7 +2,7 @@ name: 'GitHub Pages action' description: 'GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly.' author: 'peaceiris' runs: - using: 'node12' + using: 'node16' main: 'lib/index.js' branding: icon: 'upload-cloud' diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 2490d72..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,16 +0,0 @@ -version: '3.2' - -services: - dev: - image: 'docker.pkg.github.com/peaceiris/actions-gh-pages/dev:latest' - build: - context: . - cache_from: - - 'docker.pkg.github.com/peaceiris/actions-gh-pages/dev:latest' - container_name: peaceiris_actions_github_pages - volumes: - - ${PWD}:/repo - stdin_open: true - tty: true - command: - - bash diff --git a/package-lock.json b/package-lock.json index 381bb34..d1644be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "hasInstallScript": true, "license": "MIT", "dependencies": { - "@actions/core": "^1.6.0", + "@actions/core": "^1.10.0", "@actions/exec": "^1.1.1", "@actions/github": "^5.0.1", "@actions/glob": "^0.2.1", @@ -40,16 +40,25 @@ "typescript": "^4.2.3" }, "engines": { - "node": ">=12.20.1", - "npm": ">=7.5.2" + "node": ">=16.18.0", + "npm": ">=8.19.0" } }, "node_modules/@actions/core": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.6.0.tgz", - "integrity": "sha512-NB1UAZomZlCV/LmJqkLhNTqtKfFXJZAUPcfl/zqG7EfsQdeUJtaWO98SGbuQ3pydJ3fHl2CvI/51OKYlCYYcaw==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", + "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", "dependencies": { - "@actions/http-client": "^1.0.11" + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "node_modules/@actions/core/node_modules/@actions/http-client": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", + "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "dependencies": { + "tunnel": "^0.0.6" } }, "node_modules/@actions/exec": { @@ -9369,11 +9378,9 @@ "dev": true }, "node_modules/uuid": { - "version": "8.3.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", - "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==", - "dev": true, - "optional": true, + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "bin": { "uuid": "dist/bin/uuid" } @@ -9715,11 +9722,22 @@ }, "dependencies": { "@actions/core": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.6.0.tgz", - "integrity": "sha512-NB1UAZomZlCV/LmJqkLhNTqtKfFXJZAUPcfl/zqG7EfsQdeUJtaWO98SGbuQ3pydJ3fHl2CvI/51OKYlCYYcaw==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", + "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", "requires": { - "@actions/http-client": "^1.0.11" + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + }, + "dependencies": { + "@actions/http-client": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", + "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "requires": { + "tunnel": "^0.0.6" + } + } } }, "@actions/exec": { @@ -17210,11 +17228,9 @@ "dev": true }, "uuid": { - "version": "8.3.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", - "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==", - "dev": true, - "optional": true + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" }, "v8-compile-cache": { "version": "2.2.0", diff --git a/package.json b/package.json index 0350895..1535e6a 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "description": "GitHub Actions for GitHub Pages", "main": "lib/index.js", "engines": { - "node": ">=12.20.1", - "npm": ">=7.5.2" + "node": ">=16.18.0", + "npm": ">=8.19.0" }, "scripts": { "postinstall": "npx husky install", @@ -47,7 +47,7 @@ }, "homepage": "https://github.com/peaceiris/actions-gh-pages#readme", "dependencies": { - "@actions/core": "^1.6.0", + "@actions/core": "^1.10.0", "@actions/exec": "^1.1.1", "@actions/github": "^5.0.1", "@actions/glob": "^0.2.1",