Skip to content

⚡ compress images #25

⚡ compress images

⚡ compress images #25

Workflow file for this run

name: Docker Image CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: git fetch --unshallow
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Setup pnpm
uses: pnpm/[email protected]
- run: pnpm install
- run: pnpm build
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: xiyang6666
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build the Docker image
run: docker build . --file Dockerfile --tag xiyang6666/mainpage:$(git rev-parse --abbrev-ref HEAD)-$(git rev-list --count HEAD)
- name: Push the Docker image
run: docker push xiyang6666/mainpage:$(git rev-parse --abbrev-ref HEAD)-$(git rev-list --count HEAD)