-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.4 KB
/
docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Build and Push Docker Image
on:
push:
tags:
- '*'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Log in to the Docker registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
file: ./Dockerfile
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
build-args: |
GEOSERVER_VERSION=${{ github.ref_name }}
labels: |
org.opencontainers.image.title=GeoServer
org.opencontainers.image.description=GeoServer v${{ github.ref_name }} base on tomcat:9-jdk11-openjdk
org.opencontainers.image.url=https://geoserver.org/
org.opencontainers.image.documentation=https://github.com/arszp10/geoserver/README.md
org.opencontainers.image.source=https://github.com/arszp10/geoserver
org.opencontainers.image.version=${{ github.ref_name }}
org.opencontainers.image.licenses=MIT