mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-25 20:32:46 +00:00
ci: fix docker tag conflict, remove unnecessary steps
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
This commit is contained in:
parent
c0b139b1c0
commit
5a02b9b7a6
|
|
@ -15,27 +15,6 @@ jobs:
|
|||
- ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
-
|
||||
name: Determine docker tag
|
||||
id: docker_tag
|
||||
env:
|
||||
TAG_NAME: ${{ github.ref }}
|
||||
run: |
|
||||
case "${TAG_NAME}" in
|
||||
refs/heads/master)
|
||||
tag=latest
|
||||
;;
|
||||
refs/tags/*)
|
||||
tag=${TAG_NAME#refs/tags/}
|
||||
;;
|
||||
refs/heads/*)
|
||||
tag=branch-${TAG_NAME#refs/heads/}
|
||||
;;
|
||||
*)
|
||||
tag="dummy"
|
||||
;;
|
||||
esac
|
||||
echo "docker_tag=${tag}" | tee -a $GITHUB_OUTPUT
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
|
@ -110,13 +89,13 @@ jobs:
|
|||
name: Upload Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: site
|
||||
name: site-${{ matrix.os}}
|
||||
path: _site
|
||||
-
|
||||
name: Upload Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: stats.html
|
||||
name: stats.html-${{ matrix.os}}
|
||||
path: _stats.html
|
||||
-
|
||||
name: Build and push
|
||||
|
|
@ -125,7 +104,7 @@ jobs:
|
|||
context: .
|
||||
file: Dockerfile.build
|
||||
push: ${{ github.event_name == 'push' }}
|
||||
tags: tunathu/mirror-web:${{ steps.docker_tag.outputs.docker_tag }}
|
||||
tags: tunathu/mirror-web
|
||||
cache-from: |
|
||||
type=local,src=/tmp/.buildx-cache
|
||||
type=local,src=/tmp/local-test-build-cache
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ RUN \
|
|||
mv node_modules ../ && \
|
||||
rm -rf /data/*
|
||||
|
||||
ENV LANG C.UTF-8
|
||||
ENV JEKYLL_ENV production
|
||||
ENV VITE_RUBY_VITE_BIN_PATH /node_modules/.bin/vite
|
||||
ENV LANG=C.UTF-8
|
||||
ENV JEKYLL_ENV=production
|
||||
ENV VITE_RUBY_VITE_BIN_PATH=/node_modules/.bin/vite
|
||||
|
||||
CMD ["bundle", "exec", "jekyll", "build"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue