Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Use docker run instead of extra docker build #5

Merged
merged 23 commits into from
Jan 12, 2022
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Test

on: [push, pull_request]
Xuanwo marked this conversation as resolved.
Show resolved Hide resolved

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Logseq Publish
uses: ./
- name: Upload build result for test
uses: actions/upload-artifact@v2
with:
name: result
path: www
- name: Upload trace log
uses: actions/upload-artifact@v2
with:
path: trace.zip
7 changes: 0 additions & 7 deletions Dockerfile.exec

This file was deleted.

16 changes: 8 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ branding:
runs:
using: "composite"
steps:
- run: |
curl https://raw.githubusercontent.com/pengx17/logseq-publish/main/Dockerfile.exec -o Dockerfile
docker build --build-arg VERSION=${{ inputs.version }} -t tmp .
container_id=$(docker create tmp)
docker cp $container_id:/home/logseq/graph-www ${{ inputs.dest }}
docker rm $container_id
rm -f Dockerfile
shell: bash
- uses: addnab/docker-run-action@v3
with:
image: "ghcr.io/pengx17/logseq-publish:${{ inputs.version }}"
options: |
-v ${{ github.workspace }}:/home/logseq/graph -v ${{ github.workspace }}/${{ inputs.dest }}:/home/logseq/graph-www
Xuanwo marked this conversation as resolved.
Show resolved Hide resolved
run: |
xvfb-run node publish.mjs -p graph
cp trace.zip ./graph