mirror of
https://github.com/skidoodle/pastebin
synced 2026-04-28 03:07:40 +02:00
release on ghcr
This commit is contained in:
@@ -3,14 +3,15 @@ on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
permissions: read-all
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
outputs:
|
||||
hashes: ${{ steps.hash.outputs.hashes }}
|
||||
permissions:
|
||||
contents: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -22,6 +23,19 @@ jobs:
|
||||
with:
|
||||
go-version: '1.26.2'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
id: run-goreleaser
|
||||
|
||||
@@ -31,6 +31,49 @@ checksum:
|
||||
name_template: 'checksums.txt'
|
||||
algorithm: sha256
|
||||
|
||||
dockers:
|
||||
- id: pastebin-amd64
|
||||
image_templates:
|
||||
- "ghcr.io/skidoodle/pastebin:{{ .Version }}-amd64"
|
||||
dockerfile: Dockerfile.release
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
use: buildx
|
||||
build_flag_templates:
|
||||
- "--platform=linux/amd64"
|
||||
- "--label=org.opencontainers.image.title={{.ProjectName}}"
|
||||
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||
- "--label=org.opencontainers.image.version={{.Version}}"
|
||||
- "--label=org.opencontainers.image.source={{.GitURL}}"
|
||||
extra_files:
|
||||
- view
|
||||
|
||||
- id: pastebin-arm64
|
||||
image_templates:
|
||||
- "ghcr.io/skidoodle/pastebin:{{ .Version }}-arm64"
|
||||
dockerfile: Dockerfile.release
|
||||
goos: linux
|
||||
goarch: arm64
|
||||
use: buildx
|
||||
build_flag_templates:
|
||||
- "--platform=linux/arm64/v8"
|
||||
- "--label=org.opencontainers.image.title={{.ProjectName}}"
|
||||
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||
- "--label=org.opencontainers.image.version={{.Version}}"
|
||||
- "--label=org.opencontainers.image.source={{.GitURL}}"
|
||||
extra_files:
|
||||
- view
|
||||
|
||||
docker_manifests:
|
||||
- name_template: "ghcr.io/skidoodle/pastebin:latest"
|
||||
image_templates:
|
||||
- "ghcr.io/skidoodle/pastebin:{{ .Version }}-amd64"
|
||||
- "ghcr.io/skidoodle/pastebin:{{ .Version }}-arm64"
|
||||
- name_template: "ghcr.io/skidoodle/pastebin:{{ .Version }}"
|
||||
image_templates:
|
||||
- "ghcr.io/skidoodle/pastebin:{{ .Version }}-amd64"
|
||||
- "ghcr.io/skidoodle/pastebin:{{ .Version }}-arm64"
|
||||
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.25.1-alpine AS builder
|
||||
FROM golang:1.26.2-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
Reference in New Issue
Block a user