Skip to content

Commit

Permalink
Move to dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
alsi-lawr committed Aug 31, 2024
1 parent 64050ba commit 5a8ff89
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Use an ARG to allow the .NET version to be specified at build time
ARG DOTNET_VERSION=6.0

# Use the specified .NET SDK version as the base image
FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION}

# Set the working directory inside the container
WORKDIR /workspace

# Copy the entire workspace into the container's workspace directory
COPY . .

# Make sure the script is executable
RUN chmod +x /workspace/src/test.sh

# Set the entrypoint to the script
ENTRYPOINT ["/bin/bash", "/workspace/src/test.sh"]

6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ outputs:

runs:
using: 'docker'
image: 'mcr.microsoft.com/dotnet/sdk:${{ inputs.dotnet-version }}'
entrypoint: '/bin/bash'
image: 'Dockerfile'
env:
UNIT_TEST_PROJECT: ${{ inputs.project }}
UNIT_TEST_EXCLUDE_FILES: ${{ inputs.exclude-files }}
UNIT_TEST_EXCLUDE_MODULES: ${{ inputs.exclude-modules }}
UNIT_TEST_COVERAGE_THRESHOLD: ${{ inputs.threshold }}
DOTNET_VERSION: ${{ inputs.dotnet-version }}
args:
- './src/test.sh ${{ inputs.project }}'
- ${{ inputs.project }}

0 comments on commit 5a8ff89

Please sign in to comment.