Skip to content

Merge pull request #245 from jihchi/dependabot/github_actions/docker/… #562

Merge pull request #245 from jihchi/dependabot/github_actions/docker/…

Merge pull request #245 from jihchi/dependabot/github_actions/docker/… #562

Workflow file for this run

name: CI
on: [push]
env:
PUPPETEER_DOWNLOAD_PATH: ${{ github.workspace }}/.cache/Puppeteer
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: pnpm install
- name: Run test
run: pnpm test
check-access:
runs-on: ubuntu-latest
steps:
- name: Run check
run: |
curl "https://mermaid.ink/img/eyJjb2RlIjogIiUle2luaXQ6IHsndGhlbWUnOiAnZGVmYXVsdCd9fSUlXG5mbG93Y2hhcnQgVEJcbiAgd2ViXG5cbiIsICJtZXJtYWlkIjogeyJ0aGVtZSI6ICJkZWZhdWx0In0sInVwZGF0ZUVkaXRvciI6dHJ1ZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOnRydWV9" \
--silent \
--output /dev/null
build-and-push-image:
name: Push Docker image to Github registry (ghcr.io)
runs-on: ubuntu-latest
needs: [test]
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934
with:
images: ghcr.io/${{ github.repository }}
- name: Build and push Docker image
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}