mirror of
https://github.com/redhat-actions/buildah-build.git
synced 2025-06-08 10:01:34 +00:00
Add Sanity Test
- Adds Test to ensure code changes are not affecting the present action. Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
parent
90c167f5f5
commit
c559a41206
1 changed files with 46 additions and 0 deletions
46
.github/workflows/verify-build.yml
vendored
Normal file
46
.github/workflows/verify-build.yml
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
# This workflow will perform a test whenever there
|
||||
# is some change in code done to ensure that the changes
|
||||
# are not buggy and we are getting the desired output.
|
||||
|
||||
name: Test Build
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build image using Buildah
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Checkout spring-petclinic repository to perform test
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'spring-projects/spring-petclinic'
|
||||
|
||||
# Setup java
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
|
||||
# Run maven action to build the project
|
||||
- name: Maven
|
||||
run: mvn package
|
||||
|
||||
# Build image using Buildah action
|
||||
- name: Build Action
|
||||
uses: redhat-actions/buildah-action@main
|
||||
with:
|
||||
image: spring-petclinic
|
||||
tag: v1
|
||||
content: |
|
||||
target/spring-petclinic-2.3.0.BUILD-SNAPSHOT.jar
|
||||
entrypoint: |
|
||||
java
|
||||
-jar
|
||||
spring-petclinic-2.3.0.BUILD-SNAPSHOT.jar
|
||||
port: 8080
|
||||
|
||||
# Check if image is build
|
||||
- name: Check images created
|
||||
run: buildah images | grep 'spring-petclinic'
|
Loading…
Add table
Add a link
Reference in a new issue