Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikprijck committed Nov 9, 2023
1 parent 0bdcadf commit 1a3b3a5
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ inputs:
description: The current working directory
required: true

env:
SAMPLE_PATH: ${{ inputs.working-directory }}
IMAGE_NAME: ${{ github.event.pull_request.head.sha || github.sha }}
CONTAINER_NAME: ${{ github.event.pull_request.head.sha || github.sha }}
AUTH0_TEST_DOMAIN: ${{ secrets.AUTH0_TEST_DOMAIN }}
AUTH0_TEST_CLIENT_ID: ${{ secrets.AUTH0_TEST_CLIENT_ID }}
AUTH0_TEST_API_IDENTIFIER: ${{ secrets.AUTH0_TEST_API_IDENTIFIER }}

runs:
using: composite

Expand All @@ -23,6 +15,9 @@ runs:
env:
AUTH0_CFG: ${{ inputs.working-directory }}/auth_config.json
AUTH0_EXAMPLE_CFG: ${{ inputs.working-directory }}/auth_config.json.example
AUTH0_TEST_DOMAIN: ${{ secrets.AUTH0_TEST_DOMAIN }}
AUTH0_TEST_CLIENT_ID: ${{ secrets.AUTH0_TEST_CLIENT_ID }}
AUTH0_TEST_API_IDENTIFIER: ${{ secrets.AUTH0_TEST_API_IDENTIFIER }}
run: |
sed \
-e "s/{DOMAIN}/$AUTH0_TEST_DOMAIN/g" \
Expand All @@ -34,6 +29,10 @@ runs:
uses: docker/setup-buildx-action@v3

- name: Build pull request
env:
SAMPLE_PATH: ${{ inputs.working-directory }}
IMAGE_NAME: ${{ github.event.pull_request.head.sha || github.sha }}
CONTAINER_NAME: ${{ github.event.pull_request.head.sha || github.sha }}
run: |
docker build -t $IMAGE_NAME ./$SAMPLE_PATH
docker run -d -p 4200:4200 --name $CONTAINER_NAME $IMAGE_NAME
Expand All @@ -49,6 +48,8 @@ runs:
docker start -i tester
working-directory: scripts
- name: Copy app container logs
env:
CONTAINER_NAME: ${{ github.event.pull_request.head.sha || github.sha }}
run: |
mkdir -p /tmp/out
docker logs $CONTAINER_NAME > /tmp/out/app_logs.log
Expand Down

0 comments on commit 1a3b3a5

Please sign in to comment.