Added GitHub Actions workflow (#1) #1
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
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 |