Skip to content

Commit

Permalink
Add test build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mikolajgs committed Jan 4, 2024
1 parent e22f8f5 commit 5f2f7ad
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test build

on:
pull_request:
branches:
- main

jobs:
main:
name: Build and run
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Call action get-ref-properties
id: get-ref-properties
uses: Cardinal-Cryptography/github-actions/get-ref-properties@v4

- name: Build docker image
run: |
docker build --tag garu-${{ steps.get-ref-properties.outputs.sha }} -f Dockerfile .
- name: Run docker containers
run: |
docker run --rm -d \
--name test-garu-${{ steps.get-ref-properties.outputs.sha }} \
garu-${{ steps.get-ref-properties.outputs.sha }}
- name: Remove docker container
if: always()
run: |
docker rm -f test-garu-${{ steps.get-ref-properties.outputs.sha }} || true

0 comments on commit 5f2f7ad

Please sign in to comment.