Skip to content

2.0.4

2.0.4 #135

Workflow file for this run

name: Build and publish
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
test:
name: Test
uses: ./.github/workflows/test.yml
secrets: inherit
publish:
name: Build and Publish
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: 📥 Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: 🧰 Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: ⚙️ Generate Docker image metadata
id: docker_meta
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: ghcr.io/creeperkatze/modfolio
tags: |
type=raw,value=latest
type=ref,event=tag
labels: |
org.opencontainers.image.title=modfolio
org.opencontainers.image.description=Flex your modding stats anywhere
org.opencontainers.image.licenses=AGPL-3.0-only
org.opencontainers.image.source=https://github.com/creeperkatze/modfolio
annotations: |
org.opencontainers.image.title=modfolio
org.opencontainers.image.description=Flex your modding stats anywhere
org.opencontainers.image.licenses=AGPL-3.0-only
- name: 🔑 Login to GitHub Packages
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: 🔨 Build and push
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
file: Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
annotations: ${{ steps.docker_meta.outputs.annotations }}
cache-from: type=registry,ref=ghcr.io/creeperkatze/modfolio:main
cache-to: type=inline