Update docker metadata and pass version as env
This commit is contained in:
parent
92d49c6854
commit
7c990aa3f9
1 changed files with 15 additions and 9 deletions
24
.github/workflows/nightly.yml
vendored
24
.github/workflows/nightly.yml
vendored
|
|
@ -50,7 +50,9 @@ jobs:
|
||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make build-all VERSION=${{ needs.generate-version.outputs.version }}
|
env:
|
||||||
|
VERSION: ${{ needs.generate-version.outputs.version }}
|
||||||
|
run: make build-all VERSION="$VERSION"
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v6
|
uses: actions/upload-artifact@v6
|
||||||
|
|
@ -69,10 +71,6 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Generate lowercase repo
|
|
||||||
id: repo
|
|
||||||
run: echo "repo=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
|
@ -86,16 +84,24 @@ jobs:
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Extract Docker metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: ghcr.io/${{ github.repository }}
|
||||||
|
tags: |
|
||||||
|
type=raw,value=${{ needs.generate-version.outputs.tag }}
|
||||||
|
type=raw,value=${{ needs.generate-version.outputs.version }}
|
||||||
|
type=raw,value=nightly
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./docker/Dockerfile
|
file: ./docker/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
ghcr.io/${{ steps.repo.outputs.repo }}:${{ needs.generate-version.outputs.tag }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
ghcr.io/${{ steps.repo.outputs.repo }}:${{ needs.generate-version.outputs.version }}
|
|
||||||
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
|
platforms: linux/amd64,linux/arm64,linux/riscv64
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue