Add CI with GitHub Actions
This commit is contained in:
committed by
Juan Luis Baptiste
parent
b1ef5ea1d0
commit
e0b14a4514
36
.github/workflows/test.yml
vendored
Normal file
36
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, develop]
|
||||
pull_request:
|
||||
branches: [master, develop]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Checkout with token
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.API_GITHUB_TOKEN }}
|
||||
|
||||
- name: Checkout without token
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Docker Build Test
|
||||
run: docker buildx build --load --tag test:test --file ./Dockerfile ./
|
||||
|
||||
- name: Version
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: cycjimmy/semantic-release-action@v2.5.3
|
||||
with:
|
||||
semantic_version: 17.4
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.API_GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user