Skip to content

Build, Create & Push Docker images #132

Build, Create & Push Docker images

Build, Create & Push Docker images #132

Workflow file for this run

name: ci
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize]
workflow_dispatch:
env:
GitHubPersonalAccessToken: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
GitHubUsername: ${{ secrets.USERNAME }}
GitAuthorUsername: 'Vasil Kotsev'
GitAuthorEmail: '[email protected]'
jobs:
publish-built-in:
name: Publish API docker image with built-in container support
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x.x
- name: Build API image with built-in container support
run: ./build.sh BuildApiImageWithBuiltInContainerSupport
- name: Publish image to GitHub container registry
run: ./build.sh PushImageToGitHubRegistry --ImageName magic-8-ball-api:built-in
publish-dockerfile:
name: Publish API docker image built with Dockerfile
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x.x
- name: Build API image with Dockerfile
run: ./build.sh BuildApiImageWithDockerfile
- name: Publish image to GitHub container registry
run: ./build.sh PushImageToGitHubRegistry