incorporate review suggestions
This commit is contained in:
parent
7dac458c2f
commit
c096cc1581
1 changed files with 20 additions and 10 deletions
30
.github/workflows/nightly.yml
vendored
30
.github/workflows/nightly.yml
vendored
|
|
@ -5,6 +5,9 @@ on:
|
||||||
- cron: '0 0 * * *'
|
- cron: '0 0 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
generate-version:
|
generate-version:
|
||||||
name: Generate Version
|
name: Generate Version
|
||||||
|
|
@ -14,7 +17,7 @@ jobs:
|
||||||
tag: ${{ steps.version.outputs.tag }}
|
tag: ${{ steps.version.outputs.tag }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
|
@ -34,7 +37,7 @@ jobs:
|
||||||
needs: generate-version
|
needs: generate-version
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v6
|
uses: actions/setup-go@v6
|
||||||
|
|
@ -45,7 +48,7 @@ jobs:
|
||||||
run: make build-all VERSION=${{ needs.generate-version.outputs.version }}
|
run: make build-all VERSION=${{ needs.generate-version.outputs.version }}
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: picoclaw-binaries
|
name: picoclaw-binaries
|
||||||
path: build/*
|
path: build/*
|
||||||
|
|
@ -53,17 +56,20 @@ jobs:
|
||||||
build-docker:
|
build-docker:
|
||||||
name: Build Docker
|
name: Build Docker
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: generate-version
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Generate lowercase repo
|
- name: Generate lowercase repo
|
||||||
id: repo
|
id: repo
|
||||||
run: echo "repo=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
|
run: echo "repo=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Generate date tag
|
- name: Set up QEMU
|
||||||
id: date
|
uses: docker/setup-qemu-action@v3
|
||||||
run: echo "date=$(date +%Y%m%d)" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
@ -82,21 +88,25 @@ jobs:
|
||||||
file: ./docker/Dockerfile
|
file: ./docker/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ steps.repo.outputs.repo }}:nightly-${{ steps.date.outputs.date }}
|
ghcr.io/${{ steps.repo.outputs.repo }}:${{ needs.generate-version.outputs.tag }}
|
||||||
|
ghcr.io/${{ steps.repo.outputs.repo }}:${{ needs.generate-version.outputs.version }}
|
||||||
ghcr.io/${{ steps.repo.outputs.repo }}:nightly
|
ghcr.io/${{ steps.repo.outputs.repo }}:nightly
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
platforms: linux/amd64,linux/arm64,linux/riscv64
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [generate-version, build]
|
needs: [generate-version, build]
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: picoclaw-binaries
|
name: picoclaw-binaries
|
||||||
path: ./build
|
path: ./build
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue