-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d633c9
commit 66535c2
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: PR Validation | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- dev | ||
push: | ||
branches: | ||
- dev | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build Docker image | ||
run: | | ||
docker build -t petabridge/pbm-sidecar:pr-validation . | ||
- name: Run Docker container and test | ||
run: | | ||
docker run --rm petabridge/pbm-sidecar:pr-validation pbm help | ||
- name: Cleanup Docker images | ||
run: | | ||
docker rmi petabridge/pbm-sidecar:pr-validation || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS base | ||
WORKDIR /app | ||
|
||
# Install Petabridge.Cmd client so it can be invoked remotely via | ||
# Docker or K8s 'exec` commands | ||
RUN dotnet tool install --global pbm | ||
|
||
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS app | ||
WORKDIR /app | ||
|
||
# copy .NET Core global tool | ||
COPY --from=base /root/.dotnet /root/.dotnet/ | ||
|
||
# Needed because https://stackoverflow.com/questions/51977474/install-dotnet-core-tool-dockerfile | ||
ENV PATH="${PATH}:/root/.dotnet/tools" | ||
|
||
# Set the entrypoint to keep the container running | ||
ENTRYPOINT ["tail", "-f", "/dev/null"] |