Skip to content

Push Minimap API Docker Image #114

Push Minimap API Docker Image

Push Minimap API Docker Image #114

name: Push Minimap API Docker Image
on:
workflow_dispatch:
push:
branches:
- main
- develop
paths:
- wowskarma_api_minimap/**
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/wowskarma_api_minimap
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4.6.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=true
tags: |
type=semver,pattern={{version}}
type=ref,event=branch
- name: Build and push
uses: docker/build-push-action@v4
with:
context: wowskarma_api_minimap
file: wowskarma_api_minimap/Dockerfile.dev
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}