Skip to content

Merge pull request #31 from WORD-COINS/renovate/docker-metadata-actio… #73

Merge pull request #31 from WORD-COINS/renovate/docker-metadata-actio…

Merge pull request #31 from WORD-COINS/renovate/docker-metadata-actio… #73

Workflow file for this run

on:
push:
branches:
- master
pull_request:
paths:
- '.github/workflows/ci.yml'
- 'Dockerfile'
name: CI
jobs:
build-image:
name: Build and push image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,prefix=pr-,suffix=,event=pr
type=sha
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
- name: Set up Buildx
uses: docker/setup-buildx-action@v3
- name: Login to ghcr.io
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v6
with:
context: .
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