Skip to content

fix release pipeline (#5) #11

fix release pipeline (#5)

fix release pipeline (#5) #11

name: PR Validation
on:
pull_request:
branches:
- dev
push:
branches:
- dev
jobs:
build-and-test:
runs-on: ubuntu-latest
timeout-minutes: 5
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 in detached mode
run: |
docker run -d --name sidecar-pbm petabridge/pbm-sidecar:pr-validation
- name: Execute pbm help inside the container with timeout
timeout-minutes: 1
run: |
docker exec sidecar-pbm pbm help
- name: Cleanup Docker container and images
run: |
docker stop sidecar-pbm && docker rm sidecar-pbm
docker rmi petabridge/pbm-sidecar:pr-validation || true