chore(test): test running docker after build (#8010)

* chore(test): test running docker after build

* add test in the same step

* add count times

* workflow typo

* add name when output

* if then

* test docker

* use id

* no tag

* what is docker id

* load single platform

* do not test multi-arch for now

* no load
This commit is contained in:
NeverBehave
2021-08-13 21:22:32 -07:00
committed by GitHub
parent 9968dbfc96
commit 47176b6724
3 changed files with 43 additions and 19 deletions
+10 -18
View File
@@ -7,29 +7,21 @@ on:
- 'lib/**'
- 'Dockerfile'
- 'package.json'
push:
branches: '*'
paths:
- '.github/workflows/**'
- 'lib/**'
- 'Dockerfile'
- 'package.json'
# Please, always create a pull request instead of push to master.
jobs:
test:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Build dockerfile (without push)
run: |
docker buildx build \
--platform=linux/amd64,linux/arm/v7,linux/arm64 \
--output "type=image,push=false" \
--file ./Dockerfile .
- name: Build dockerfile and Run (without push)
run: |
docker build \
--tag rsshub:latest \
--file ./Dockerfile .
chmod +x scripts/docker/test-docker.sh
scripts/docker/test-docker.sh