Skip to content

Commit

Permalink
Create build pipeline (#15)
Browse files Browse the repository at this point in the history
Create build pipeline for pull requests
Update actions versions
  • Loading branch information
gicastel authored Jul 31, 2024
1 parent 6c96880 commit 5cc6392
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 5 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: build

on:
pull_request:
branches:
- main

jobs:
build-binaries:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x.x

- name: Build
run: |
dotnet publish ./src/qest/ -o ./pub --runtime linux-x64 -c Release --self-contained true /p:PublishSingleFile=true
dotnet publish ./src/qest/ -o ./pub --runtime win-x64 -c Release --self-contained true /p:PublishSingleFile=true
build-docker-standalone:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Check out code

- uses: mr-smithers-excellent/docker-build-push@v6
name: Build Docker standalone image
with:
image: qest
tags: standalone-dev
registry: ghcr.io
dockerfile: standalone.dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
pushImage: false

build-docker-bundle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Check out code

- uses: mr-smithers-excellent/docker-build-push@v6
name: Build Docker bundle image
with:
image: qest
tags: bundle-dev
registry: ghcr.io
dockerfile: bundle.dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
pushImage: false
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
build-binaries:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1.9.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x.x

Expand All @@ -37,10 +37,10 @@ jobs:
build-docker-standalone:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
name: Check out code

- uses: mr-smithers-excellent/docker-build-push@v5
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build & push Docker standalone image
with:
image: qest
Expand All @@ -56,7 +56,7 @@ jobs:
- uses: actions/checkout@v2
name: Check out code

- uses: mr-smithers-excellent/docker-build-push@v5
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build & push Docker bundle image
with:
image: qest
Expand Down

0 comments on commit 5cc6392

Please sign in to comment.