新版系统
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 0s
Details
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 0s
Details
This commit is contained in:
parent
28a53bed1b
commit
1880a712fd
|
@ -4,72 +4,15 @@ on: [push]
|
|||
|
||||
jobs:
|
||||
Explore-Gitea-Actions:
|
||||
runs-on: linux_centos
|
||||
# container: catthehacker/ubuntu:act-latest
|
||||
# container:
|
||||
# image: ghcr.nju.edu.cn/catthehacker/ubuntu:act-latest
|
||||
# volumes:
|
||||
# - /run/docker.sock:/run/docker.sock
|
||||
# env:
|
||||
# DOCKER_ORG: gitea
|
||||
# DOCKER_LATEST: latest
|
||||
runs-on: linux
|
||||
steps:
|
||||
- name: Build & Deploy
|
||||
run: |
|
||||
rm -rf /opt/workspace/website
|
||||
mkdir -p /opt/workspace/website
|
||||
git clone http://127.0.0.1:3000/huxin/website.git /opt/workspace/website
|
||||
cd /opt/workspace/website
|
||||
docker build -t website-v1:latest "."
|
||||
docker stop website-v1 || true
|
||||
docker rm -f website-v1 || true
|
||||
docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1
|
||||
docker rmi $(docker images -f "dangling=true" -q) || true
|
||||
docker ps
|
||||
|
||||
# - name: Build
|
||||
# run:
|
||||
|
||||
# - name: Deploy
|
||||
# run: |
|
||||
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v4
|
||||
# with:
|
||||
# fetch-depth: 0 # all history for all branches and tags
|
||||
|
||||
# - name: Set up QEMU
|
||||
# uses: docker/setup-qemu-action@v3
|
||||
|
||||
# - name: Set up Docker BuildX
|
||||
# uses: docker/setup-buildx-action@v3
|
||||
|
||||
# - name: Login to DockerHub
|
||||
# uses: docker/login-action@v3
|
||||
# with:
|
||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
# - name: Get Meta
|
||||
# id: meta
|
||||
# run: |
|
||||
# echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
||||
# echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
|
||||
|
||||
# - name: Build and push
|
||||
# uses: docker/build-push-action@v5
|
||||
# with:
|
||||
# context: .
|
||||
# file: ./Dockerfile
|
||||
# platforms: |
|
||||
# linux/amd64
|
||||
# linux/arm64
|
||||
# push: true
|
||||
# tags: |
|
||||
# ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}
|
||||
|
||||
# - run: docker build -t website-v1:latest "."
|
||||
# - run: docker rm -f website-v1 || true
|
||||
# - run: docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1
|
||||
# - run: docker rmi $(docker images -f "dangling=true" -q) || true
|
||||
# - run: docker ps
|
||||
- run: rm -rf /opt/workspace/website
|
||||
- run: git clone http://127.0.0.1:3000/huxin/website.git /opt/workspace/website
|
||||
- run: cd /opt/workspace/website
|
||||
- run: docker build -t website-v2:latest "."
|
||||
- run: docker stop website-v2 || true
|
||||
- run: docker rm -f website-v2 || true
|
||||
- run: docker run -d -p 9000:80 --restart=unless-stopped --name website-v2 website-v2
|
||||
- run: docker rmi $(docker images -f "dangling=true" -q) || true
|
||||
- run: docker ps
|
||||
|
|
|
@ -12,7 +12,7 @@ RUN npm install -g pnpm
|
|||
RUN pnpm config set registry https://registry.npmmirror.com
|
||||
# 下载编译
|
||||
RUN pnpm i
|
||||
RUN pnpm build
|
||||
# RUN pnpm build
|
||||
RUN pnpm generate
|
||||
# RUN yarn config set registry https://registry.npmmirror.com
|
||||
# RUN yarn
|
||||
|
|
Loading…
Reference in New Issue