Update build pipelines to support RC builds
This commit is contained in:
32
.github/workflows/build_docker.yml
vendored
32
.github/workflows/build_docker.yml
vendored
@@ -35,6 +35,8 @@ jobs:
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
@@ -43,16 +45,14 @@ jobs:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# private image
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository }}
|
||||
images: |
|
||||
ghcr.io/${{ github.repository }}${{ github.ref.contains('-rc.') ? '' : '-testing' }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
@@ -66,27 +66,3 @@ jobs:
|
||||
BuiltAt=${{ steps.buildvars.outputs.built_at }}
|
||||
GitCommit=${{ steps.buildvars.outputs.git_commit }}
|
||||
Version=${{ steps.buildvars.outputs.version }}
|
||||
|
||||
# public image
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
id: publicmeta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository }}-testing
|
||||
|
||||
- name: Build and push Docker image
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
tags: ${{ steps.publicmeta.outputs.tags }}
|
||||
labels: ${{ steps.publicmeta.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
build-args: |
|
||||
BuiltAt=${{ steps.buildvars.outputs.built_at }}
|
||||
GitCommit=${{ steps.buildvars.outputs.git_commit }}
|
||||
Version=${{ steps.buildvars.outputs.version }}
|
||||
|
||||
Reference in New Issue
Block a user