Skip to content

chore: add auth token #65

chore: add auth token

chore: add auth token #65

name: build java
on:
push:
branches:
- master
workflow_dispatch:
env:
REGISTRY: ghcr.io
jobs:
push:
name: "Docker push for ${{ matrix.image }}"
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
include:
- target: minecraft
platforms: linux/amd64,linux/arm64
- target: proxy
platforms: linux/amd64
steps:
- uses: actions/checkout@v4
- name: Set up QEMU for multi-platform support
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/mineinabyss/${{ matrix.target }}
- name: Build and push ${{ matrix.target }}
uses: docker/build-push-action@v6
with:
file: Dockerfile
platforms: ${{ matrix.platforms }}
push: true
target: ${{ matrix.target }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}