mirror of
https://github.com/kieraneglin/pinchflat.git
synced 2026-01-23 02:24:24 +00:00
[Housekeeping] Add release workflow (takeover) (#147)
* [Housekeeping] Add release workflow (#141) * add release workflow This will create tags when a new release is published * fix(workflows): refactor release workflow Signed-off-by: Devin Buhl <devin@buhl.casa> * Update release.yml --------- Signed-off-by: Devin Buhl <devin@buhl.casa> * Linting * Testing changes --------- Signed-off-by: Devin Buhl <devin@buhl.casa> Co-authored-by: Devin Buhl <onedr0p@users.noreply.github.com>
This commit is contained in:
parent
fae7ba3304
commit
9dd64f3a2d
1 changed files with 81 additions and 0 deletions
81
.github/workflows/docker_release.yml
vendored
Normal file
81
.github/workflows/docker_release.yml
vendored
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
name: Docker Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
platforms:
|
||||
type: choice
|
||||
description: 'Build Platforms'
|
||||
required: true
|
||||
default: 'linux/amd64'
|
||||
options:
|
||||
- 'linux/amd64'
|
||||
- 'linux/amd64,linux/arm64'
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
docker.io/keglin/pinchflat
|
||||
ghcr.io/${{ github.repository }}
|
||||
tags: |
|
||||
type=semver,pattern={{version}},prefix=v
|
||||
type=semver,pattern={{major}}.{{minor}},prefix=v
|
||||
type=semver,pattern={{major}},prefix=v
|
||||
type=ref,event=branch
|
||||
flavor: |
|
||||
latest=auto
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Echo outputs
|
||||
run: |
|
||||
echo "${{ steps.meta.outputs.tags }}"
|
||||
echo "${{ steps.meta.outputs.labels }}"
|
||||
echo "${{ github.event.inputs.platforms }}"
|
||||
echo "${{ steps.meta.outputs.tags || 'master' }}"
|
||||
echo "${{ github.event.inputs.platforms || 'linux/amd64,linux/arm64' }}"
|
||||
|
||||
- name: Build and Push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./selfhosted.Dockerfile
|
||||
platforms: ${{ github.event.inputs.platforms || 'linux/amd64,linux/arm64' }}
|
||||
push: false # TODO: Set to true once everything is proven to work
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue