mirror of
https://github.com/sergi0g/cup.git
synced 2025-11-14 16:13:48 -05:00
Update nightly.yml
Some checks failed
CI / build-binary (push) Has been cancelled
CI / build-image (push) Has been cancelled
Some checks failed
CI / build-binary (push) Has been cancelled
CI / build-image (push) Has been cancelled
This commit is contained in:
33
.github/workflows/nightly.yml
vendored
33
.github/workflows/nightly.yml
vendored
@@ -3,6 +3,22 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
get-tag:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
tag: ${{ steps.tag.outputs.tag }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Get Docker image tag
|
||||||
|
id: tag
|
||||||
|
run: |
|
||||||
|
if [ "${GITHUB_REF_NAME}" == "main" ]; then
|
||||||
|
TAG="nightly"
|
||||||
|
else
|
||||||
|
TAG="${GITHUB_REF_NAME}-nightly"
|
||||||
|
fi
|
||||||
|
echo "tag=$TAG" >> $GITHUB_ENV
|
||||||
build-binaries:
|
build-binaries:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -45,6 +61,7 @@ jobs:
|
|||||||
cup-linux-arm64
|
cup-linux-arm64
|
||||||
|
|
||||||
build-image:
|
build-image:
|
||||||
|
needs: get-tag
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -63,29 +80,19 @@ jobs:
|
|||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Get Docker image tag
|
|
||||||
id: tag
|
|
||||||
run: |
|
|
||||||
if [ "${GITHUB_REF_NAME}" == "main" ]; then
|
|
||||||
TAG="nightly"
|
|
||||||
else
|
|
||||||
TAG="${GITHUB_REF_NAME}-nightly"
|
|
||||||
fi
|
|
||||||
echo "tag=$TAG" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64, linux/arm64
|
platforms: linux/amd64, linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: ghcr.io/sergi0g/cup:${{ steps.tag.outputs.tag }}
|
tags: ghcr.io/sergi0g/cup:${{ needs.get-tag.outputs.tag }}
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
|
||||||
nightly-release:
|
nightly-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build-binaries
|
needs: [build-binaries, get-tag]
|
||||||
steps:
|
steps:
|
||||||
- name: Download binaries
|
- name: Download binaries
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
@@ -96,6 +103,6 @@ jobs:
|
|||||||
- uses: pyTooling/Actions/releaser@r0
|
- uses: pyTooling/Actions/releaser@r0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
tag: nightly
|
tag: ${{ needs.get-tag.outputs.tag }}
|
||||||
rm: true
|
rm: true
|
||||||
files: binaries/*
|
files: binaries/*
|
||||||
|
|||||||
Reference in New Issue
Block a user