mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-09-30 13:53:06 +02:00
Fix release pipeline (#1561)
* fix debug cloud build * fix cloudbuild release * add workflow * fix release * use push action * Trigger Build * Trigger Build * Trigger Build * Trigger Build * Trigger Build * add * add parallel steps * add parallel steps * fix pathc * fix dockerfile * fix dockerfile * add executor * deploy * test
This commit is contained in:
@@ -0,0 +1,168 @@
|
||||
name: Build images on push to master
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+*'
|
||||
|
||||
jobs:
|
||||
build-executor:
|
||||
env:
|
||||
GITHUB_SHA: ${{ github.sha }}
|
||||
GITHUB_REF: ${{ github.ref }}
|
||||
PLATFORMS: "linux/amd64,linux/arm64,linux/ppc64le"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone source code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
with:
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
with:
|
||||
version: latest
|
||||
|
||||
- name: Setup gcloud CLI
|
||||
uses: google-github-actions/setup-gcloud@master
|
||||
with:
|
||||
service_account_key: ${{ secrets.GCR_DEVOPS_SERVICE_ACCOUNT_KEY }}
|
||||
project_id: kaniko-project
|
||||
export_default_credentials: true
|
||||
|
||||
# Configure docker to use the gcloud command-line tool as a credential helper
|
||||
- run: |
|
||||
# Set up docker to authenticate
|
||||
# via gcloud command-line tool.
|
||||
gcloud auth configure-docker
|
||||
|
||||
- uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./deploy/Dockerfile_slim
|
||||
platforms: linux/amd64,linux/arm64,linux/ppc64le
|
||||
push: true
|
||||
tags: |
|
||||
gcr.io/kaniko-project/executor:${{ env.GITHUB_SHA }}-slim
|
||||
|
||||
- uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./deploy/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64,linux/ppc64le
|
||||
push: true
|
||||
tags: |
|
||||
gcr.io/kaniko-project/executor:${{ env.GITHUB_SHA }}
|
||||
|
||||
build-debug:
|
||||
env:
|
||||
GITHUB_SHA: ${{ github.sha }}
|
||||
GITHUB_REF: ${{ github.ref }}
|
||||
PLATFORMS: "linux/amd64,linux/arm64,linux/ppc64le"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone source code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
with:
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
with:
|
||||
version: latest
|
||||
|
||||
- name: Setup gcloud CLI
|
||||
uses: google-github-actions/setup-gcloud@master
|
||||
with:
|
||||
service_account_key: ${{ secrets.GCR_DEVOPS_SERVICE_ACCOUNT_KEY }}
|
||||
project_id: kaniko-project
|
||||
export_default_credentials: true
|
||||
|
||||
# Configure docker to use the gcloud command-line tool as a credential helper
|
||||
- run: |
|
||||
# Set up docker to authenticate
|
||||
# via gcloud command-line tool.
|
||||
gcloud auth configure-docker
|
||||
|
||||
- uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./deploy/Dockerfile_debug
|
||||
platforms: linux/amd64,linux/arm64,linux/ppc64le
|
||||
push: true
|
||||
tags: |
|
||||
gcr.io/kaniko-project/executor:${{ env.GITHUB_SHA }}
|
||||
|
||||
build-warmer:
|
||||
env:
|
||||
GITHUB_SHA: ${{ github.sha }}
|
||||
GITHUB_REF: ${{ github.ref }}
|
||||
PLATFORMS: "linux/amd64,linux/arm64,linux/ppc64le"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone source code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
with:
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
with:
|
||||
version: latest
|
||||
|
||||
- name: Setup gcloud CLI
|
||||
uses: google-github-actions/setup-gcloud@master
|
||||
with:
|
||||
service_account_key: ${{ secrets.GCR_DEVOPS_SERVICE_ACCOUNT_KEY }}
|
||||
project_id: kaniko-project
|
||||
export_default_credentials: true
|
||||
|
||||
# Configure docker to use the gcloud command-line tool as a credential helper
|
||||
- run: |
|
||||
# Set up docker to authenticate
|
||||
# via gcloud command-line tool.
|
||||
gcloud auth configure-docker
|
||||
- uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./deploy/Dockerfile_warmer
|
||||
platforms: linux/amd64,linux/arm64,linux/ppc64le
|
||||
push: true
|
||||
tags: |
|
||||
gcr.io/kaniko-project/warmer:${{ env.GITHUB_SHA }}
|
||||
Reference in New Issue
Block a user