Bump @types/node from 20.11.16 to 20.11.17 #292
Workflow file for this run
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
name: CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
ssh-docker-engine-service-identifier: "ssh-docker-engine-service" | |
http-docker-engine-service-identifier: "http-docker-engine-service" | |
https-docker-engine-service-identifier: "https-docker-engine-service" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
update-pnpm-caches: | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x, 20.x] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: "Install pnpm" | |
shell: bash | |
run: npm install pnpm@8 -g | |
- name: "Get pnpm store" | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ env.STORE_PATH }} | |
restore-keys: ${{ runner.os }}-node${{ matrix.node-version }}-pnpm-store- | |
key: ${{ runner.os }}-node${{ matrix.node-version }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
- run: python3 -m pip install setuptools | |
- run: pnpm install | |
docker-build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
dockerfile: ["ssh", "http", "https", "socket"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/metadata-action@v5 | |
id: meta | |
with: | |
images: ghcr.io/${{ github.repository }}/${{ matrix.dockerfile }}-dind | |
- uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: false | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
file: test/data/agent-${{ matrix.dockerfile }}.dockerfile | |
outputs: type=docker,dest=/tmp/${{ matrix.dockerfile }}-dind-docker-image.tar | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.dockerfile }}-dind-docker-image | |
path: /tmp/${{ matrix.dockerfile }}-dind-docker-image.tar | |
if-no-files-found: error | |
docker-publish: | |
runs-on: ubuntu-latest | |
needs: [docker-build] | |
if: ${{ contains(github.event.head_commit.modified, 'test/data/agent-http.dockerfile') || contains(github.event.head_commit.modified, 'test/data/agent-https.dockerfile') || contains(github.event.head_commit.modified, 'test/data/agent-socket.dockerfile') || contains(github.event.head_commit.modified, 'test/data/agent-ssh.dockerfile') }} | |
environment: "Docker release" | |
strategy: | |
matrix: | |
dockerfile: ["ssh", "http", "https", "socket"] | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/metadata-action@v5 | |
id: meta | |
with: | |
images: ghcr.io/${{ github.repository }}/${{ matrix.dockerfile }}-dind | |
- uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
file: test/data/agent-${{ matrix.dockerfile }}.dockerfile | |
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 | |
ssh-docker-engine-service: | |
needs: [update-pnpm-caches, docker-build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
path: /tmp | |
name: ssh-dind-docker-image | |
- uses: docker/metadata-action@v5 | |
id: meta | |
with: | |
images: ghcr.io/${{ github.repository }}/ssh-dind | |
- run: docker load --input /tmp/ssh-dind-docker-image.tar | |
- run: docker image ls -a | |
- run: docker run --rm --privileged --detach --ulimit nproc=-1 --ulimit core=-1 --pids-limit -1 --oom-score-adj -500 ${{ steps.meta.outputs.tags }} | |
- uses: ./.github/actions/workflow-level-service/expose | |
with: | |
service-identifier: ${{ env.ssh-docker-engine-service-identifier }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
http-docker-engine-service: | |
needs: [update-pnpm-caches, docker-build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
path: /tmp | |
name: http-dind-docker-image | |
- uses: docker/metadata-action@v5 | |
id: meta | |
with: | |
images: ghcr.io/${{ github.repository }}/http-dind | |
- run: docker load --input /tmp/http-dind-docker-image.tar | |
- run: docker image ls -a | |
- run: docker run --rm --privileged --detach --ulimit nproc=-1 --ulimit core=-1 --pids-limit -1 --oom-score-adj -500 ${{ steps.meta.outputs.tags }} | |
- uses: ./.github/actions/workflow-level-service/expose | |
with: | |
service-identifier: ${{ env.http-docker-engine-service-identifier }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
https-docker-engine-service: | |
needs: [update-pnpm-caches, docker-build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
path: /tmp | |
name: https-dind-docker-image | |
- uses: docker/metadata-action@v5 | |
id: meta | |
with: | |
images: ghcr.io/${{ github.repository }}/https-dind | |
- run: docker load --input /tmp/https-dind-docker-image.tar | |
- run: docker image ls -a | |
- run: docker run --rm --privileged --detach --ulimit nproc=-1 --ulimit core=-1 --pids-limit -1 --oom-score-adj -500 ${{ steps.meta.outputs.tags }} | |
- uses: ./.github/actions/workflow-level-service/expose | |
with: | |
service-identifier: ${{ env.https-docker-engine-service-identifier }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
remote-docker-engine-services-online: | |
needs: [docker-build, update-pnpm-caches] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/workflow-level-service/connect | |
with: | |
service-identifier: ${{ env.ssh-docker-engine-service-identifier }} | |
- uses: ./.github/actions/workflow-level-service/connect | |
with: | |
service-identifier: ${{ env.http-docker-engine-service-identifier }} | |
- uses: ./.github/actions/workflow-level-service/connect | |
with: | |
service-identifier: ${{ env.https-docker-engine-service-identifier }} | |
remote-docker-engine-tests: | |
needs: [remote-docker-engine-services-online] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x, 20.x] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
remote-docker-engine: [ssh, http, https] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: "Install pnpm" | |
shell: bash | |
run: npm install pnpm@8 -g | |
- name: "Get pnpm store" | |
shell: bash | |
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: "Restore pnpm store" | |
uses: actions/cache/restore@v4 | |
with: | |
fail-on-cache-miss: true | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-node${{ matrix.node-version }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
- name: "Install dependencies with pnpm" | |
shell: bash | |
run: pnpm install | |
stop-services: | |
if: always() | |
runs-on: ubuntu-latest | |
needs: [remote-docker-engine-tests] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/workflow-level-service/stop | |
with: | |
service-identifier: ${{ env.ssh-docker-engine-service-identifier }} | |
- uses: ./.github/actions/workflow-level-service/stop | |
with: | |
service-identifier: ${{ env.http-docker-engine-service-identifier }} | |
- uses: ./.github/actions/workflow-level-service/stop | |
with: | |
service-identifier: ${{ env.https-docker-engine-service-identifier }} | |
local-docker-desktop-tests: | |
runs-on: ${{ matrix.os }} | |
needs: [remote-docker-engine-tests, stop-services, http-docker-engine-service, https-docker-engine-service, ssh-docker-engine-service] | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [16.x, 18.x, 20.x] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
docker-desktop: [v1, v2, v3, v4, v5, v6] | |
steps: | |
- uses: actions/checkout@v4 | |
- if: ${{ runner.os != 'macOS' }} | |
run: sleep 10s | |
- if: ${{ runner.os == 'macOS' }} | |
run: sleep 10 | |
local-podman-desktop-tests: | |
runs-on: ${{ matrix.os }} | |
needs: [remote-docker-engine-tests, stop-services, http-docker-engine-service, https-docker-engine-service, ssh-docker-engine-service] | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [16.x, 18.x, 20.x] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
podman-desktop: [v1, v2, v3, v4, v5, v6] | |
steps: | |
- uses: actions/checkout@v4 | |
- if: ${{ runner.os != 'macOS' }} | |
run: sleep 10s | |
- if: ${{ runner.os == 'macOS' }} | |
run: sleep 10 | |
# https://github.com/orgs/community/discussions/26822 | |
pr-can-merge: | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
needs: [local-podman-desktop-tests, local-docker-desktop-tests] | |
steps: | |
- run: exit 1 | |
if: >- | |
${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }} | |
publish-official-release: | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main'}} | |
environment: "NPM official-release" | |
needs: [local-docker-desktop-tests, remote-docker-engine-tests, local-podman-desktop-tests] | |
steps: | |
- run: echo "Publishing artifacts" |