mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-05-15 11:36:20 +02:00
* ci: upgrade GitHub Actions to Node.js 24-compatible versions Node.js 20 actions are deprecated and will be forced to Node.js 24 starting June 2, 2026. Bump all affected actions: - actions/checkout v4 -> v6 - actions/setup-node v4 -> v6 - actions/cache v4 -> v5 - actions/upload-artifact v4 -> v6 - docker/setup-qemu-action v3 -> v4 - docker/setup-buildx-action v3 -> v4 - docker/login-action v3 -> v4 - docker/metadata-action v5 -> v6 - docker/build-push-action v6 -> v7 * ci: pin all GitHub Actions to full commit SHAs Replace floating @vN tags with immutable SHA refs for supply-chain security. Tags can be moved; SHAs cannot. Each ref includes a # vN comment for readability. Also pins actions/cache@v5, actions/setup-go@v5, and all docker/* actions that were previously using floating tags.
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: Publish Docker image
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
|
|
- uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4
|
|
|
|
- uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
|
|
|
|
- uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6
|
|
id: meta
|
|
with:
|
|
images: ghcr.io/koala73/worldmonitor
|
|
tags: |
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
type=raw,value=latest,enable=${{ github.event_name == 'release' }}
|
|
type=sha,prefix=sha-
|
|
|
|
- uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7
|
|
with:
|
|
context: .
|
|
file: docker/Dockerfile
|
|
push: true
|
|
platforms: linux/amd64,linux/arm64
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|