Skip to content

fix: file instead of dockerfile #7

fix: file instead of dockerfile

fix: file instead of dockerfile #7

Workflow file for this run

name: Docker Image CI
on:
push:
branches:
- main
jobs:
docker:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
strategy:
matrix:
image: [backend]
steps:
- uses: actions/checkout@v2
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}-${{ matrix.image }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=edge
type=sha
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./${{ matrix.image }}/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max