-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (40 loc) · 1.08 KB
/
build.yaml
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
name: CI
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
name: build
runs-on: ubuntu-latest
env:
IMAGE_NAME: mcserver
permissions:
packages: write
contents: read
strategy:
fail-fast: false
matrix:
include:
- name: plain
version: "1.21"
steps:
- uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "Build and push"
uses: docker/build-push-action@v2
with:
context: ${{ matrix.name }}
push: true
build-args: |
PAPER_SPIGOT_VERSION=${{ matrix.version }}
SERVER_VERSION=${{ matrix.version }}
tags: |
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}/${{ matrix.name }}:latest
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}/${{ matrix.name }}:${{ matrix.version }}