forked from MTSR/mapserver
39 lines
875 B
YAML
39 lines
875 B
YAML
|
name: docker
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- 'main'
|
||
|
tags:
|
||
|
- 'v*'
|
||
|
pull_request:
|
||
|
|
||
|
jobs:
|
||
|
build:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Checkout
|
||
|
uses: actions/checkout@v4
|
||
|
with:
|
||
|
fetch-depth: 0
|
||
|
|
||
|
- name: Docker meta
|
||
|
id: meta
|
||
|
uses: docker/metadata-action@v5
|
||
|
with:
|
||
|
images: ghcr.io/minetest-mapserver/mapserver
|
||
|
|
||
|
- name: Log in to the Container registry
|
||
|
uses: docker/login-action@v3
|
||
|
with:
|
||
|
registry: ghcr.io
|
||
|
username: ${{ github.actor }}
|
||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||
|
|
||
|
- name: Build and push
|
||
|
uses: docker/build-push-action@v5
|
||
|
with:
|
||
|
context: .
|
||
|
push: ${{ github.event_name != 'pull_request' }}
|
||
|
tags: ${{ steps.meta.outputs.tags }}
|
||
|
labels: ${{ steps.meta.outputs.labels }}
|