Update CI
This commit is contained in:
23
.github/workflows/build-image.yml
vendored
23
.github/workflows/build-image.yml
vendored
@@ -7,7 +7,24 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Set up Docker Buildx
|
||||||
- name: Build the Docker image
|
uses: docker/setup-buildx-action@v3
|
||||||
run: docker build . --tag papermc:$(date +%s)
|
|
||||||
|
- name: Login to GitHub 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:
|
||||||
|
push: true
|
||||||
|
tags: ghcr.io/${{ github.repository }}
|
||||||
|
labels: org.opencontainers.image.source=https://github.com/${{ github.repository }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
|||||||
Reference in New Issue
Block a user