feat(ci): merge nightly and debug workflows
This commit is contained in:
No files matched your search
@@ -1,30 +0,0 @@
|
|||||||
name: Debug Release
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
tag:
|
|
||||||
description: "Tag of image to build"
|
|
||||||
required: true
|
|
||||||
jobs:
|
|
||||||
build-release:
|
|
||||||
name: Build and release Docker image
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v1
|
|
||||||
- name: Login into DockerHub
|
|
||||||
run: echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
|
|
||||||
- name: Login into GitHub Container Registry
|
|
||||||
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
|
||||||
- name: Build and Push
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
ghcr.io/${{ github.repository }}:${{ github.event.inputs.tag }}
|
|
||||||
${{ github.repository }}:${{ github.event.inputs.tag }}
|
|
||||||
@@ -2,7 +2,12 @@ name: Nightly Release
|
|||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * *"
|
- cron: "0 0 * * *"
|
||||||
workflow_dispatch: {}
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
custom_tag:
|
||||||
|
description: 'Custom tag (optional, will use "nightly" if not provided)'
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
jobs:
|
jobs:
|
||||||
check-date:
|
check-date:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -53,10 +58,15 @@ jobs:
|
|||||||
run: echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
|
run: echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
|
||||||
- name: Login into GitHub Container Registry
|
- name: Login into GitHub Container Registry
|
||||||
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||||
- name: Generate short hash
|
- name: Generate short hash and set tag
|
||||||
run: |
|
run: |
|
||||||
_short_hash=${{ github.sha }}
|
_short_hash=${{ github.sha }}
|
||||||
echo "SHORT_HASH=${_short_hash:0:7}" >> $GITHUB_ENV
|
echo "SHORT_HASH=${_short_hash:0:7}" >> $GITHUB_ENV
|
||||||
|
if [ -n "${{ github.event.inputs.custom_tag }}" ]; then
|
||||||
|
echo "TAG_NAME=${{ github.event.inputs.custom_tag }}" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "TAG_NAME=nightly" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
- name: Build and Push
|
- name: Build and Push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
@@ -66,6 +76,6 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ github.repository }}:${{ env.SHORT_HASH }}
|
ghcr.io/${{ github.repository }}:${{ env.SHORT_HASH }}
|
||||||
ghcr.io/${{ github.repository }}:nightly
|
ghcr.io/${{ github.repository }}:${{ env.TAG_NAME }}
|
||||||
${{ github.repository }}:${{ env.SHORT_HASH }}
|
${{ github.repository }}:${{ env.SHORT_HASH }}
|
||||||
${{ github.repository }}:nightly
|
${{ github.repository }}:${{ env.TAG_NAME }}
|
||||||
Reference in New Issue
Block a user