Skip to content

Merge pull request #87 from 0GiS0/dependabot/nuget/src/Swashbuckle.As… #203

Merge pull request #87 from 0GiS0/dependabot/nuget/src/Swashbuckle.As…

Merge pull request #87 from 0GiS0/dependabot/nuget/src/Swashbuckle.As… #203

name: 🐳📦 GitHub Packages demo
on:
push:
branches: [main]
paths:
- "src/**"
- "build/docker/**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login GitHub Packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Short the sha to 7 characters only
id: vars
run: echo ::set-output name=tag::$(echo ${GITHUB_SHA::7})
- uses: docker/build-push-action@v6
with:
context: src
file: build/docker/Dockerfile
platforms: linux/amd64, linux/arm64
push: true
tags: ghcr.io/0gis0/tour-of-heroes-dotnet-api/tour-of-heroes-api:${{ steps.vars.outputs.tag }}