Reorganize GHCR workflows
This removes the manual build workflow, unifying it with the automatic GHCR release workflow and ensuring Docker images are autobuilt.
This commit is contained in:
parent
a1521884ef
commit
6f3720a4ae
2 changed files with 19 additions and 38 deletions
34
.github/workflows/docker-manual.yml
vendored
34
.github/workflows/docker-manual.yml
vendored
|
@ -1,34 +0,0 @@
|
|||
name: Push to GHCR (Manual)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
required: true
|
||||
description: "Build specific tag"
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.inputs.tag }}
|
||||
- name: Set up Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Login to registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build & push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository }}:latest
|
||||
ghcr.io/${{ github.repository }}:${{ github.event.inputs.tag }}
|
23
.github/workflows/docker.yml
vendored
23
.github/workflows/docker.yml
vendored
|
@ -1,16 +1,31 @@
|
|||
name: Push to GHCR
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- created
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
required: true
|
||||
description: "Build specific tag"
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set tag name from manual dispatch
|
||||
if: ${{ github.event_name == "workflow_dispatch" }}
|
||||
run: |
|
||||
echo "tag_name=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
|
||||
- name: Set tag name from Git
|
||||
if: ${{ github.event_name == "push" }}
|
||||
run: |
|
||||
echo "tag_name=${{ github.ref_name }}" >> $GITHUB_ENV
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ env.tag_name }}
|
||||
- name: Set up Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Login to registry
|
||||
|
@ -27,4 +42,4 @@ jobs:
|
|||
push: true
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository }}:latest
|
||||
ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }}
|
||||
ghcr.io/${{ github.repository }}:${{ env.tag_name }}
|
||||
|
|
Loading…
Reference in a new issue