Skip to content

api: switch to ensemble #3

api: switch to ensemble

api: switch to ensemble #3

Workflow file for this run

name: Build api image
on:
push:
branches:
- main
paths:
- "api/**"
- ".github/workflows/build-api.yaml"
jobs:
build-api:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/m1guelpf/dyson-api
tags: |
type=sha
type=edge
type=semver,pattern={{major}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
context: ./api
cache-from: type=gha
file: ./api/Dockerfile
cache-to: type=gha,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}