Skip to content

Commit

Permalink
implemented test in actions
Browse files Browse the repository at this point in the history
  • Loading branch information
phartenfeller committed Nov 14, 2022
1 parent 4851392 commit 71c5e51
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/publish-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,26 @@ env:
IMAGE_NAME: lct-playwright-image

jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
test:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- name: Test Docker Image
run: |
docker build . --file Dockerfile -t $IMAGE_NAME --cache-from ghcr.io/mt-ag/$IMAGE_NAME
./run_tests.sh
# Push image to GitHub Packages.
# See also https://docs.github.com/en/actions/guides/publishing-docker-images
push:
runs-on: ubuntu-latest
# Ensure test job passes before pushing image.
needs: test

runs-on: ubuntu-20.04
if: github.event_name == 'push'

steps:
Expand Down

0 comments on commit 71c5e51

Please sign in to comment.