Skip to content

NightlyBuild

NightlyBuild #334

name: NightlyBuild
on:
schedule:
# This is a UTC time
- cron: "0 16 * * *"
# Keep it only for test purpose, comment it once everything is ok
workflow_dispatch:
jobs:
BuildController:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Docker meta for kubesphere
id: meta
if: github.repository_owner == 'kubesphere'
uses: docker/metadata-action@v3
with:
images: |
kubespheredev/devops-controller
ghcr.io/${{ github.repository_owner }}/devops-controller
tags: |
type=schedule,pattern=nightly-{{date 'YYYYMMDD'}}
type=raw,enable=true,value=nightly-{{date 'YYYYMMDD'}}
- name: Docker meta for Contributors
id: metaContributors
if: github.repository_owner != 'kubesphere'
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ github.repository_owner }}/devops-controller
tags: |
type=schedule,pattern=nightly-{{date 'YYYYMMDD'}}
type=raw,enable=true,value=nightly-{{date 'YYYYMMDD'}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_SECRETS }}
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v2.4.0
if: github.repository_owner == 'kubesphere'
with:
file: config/dockerfiles/controller-manager/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
- name: Build and push Docker images for Contributors
uses: docker/build-push-action@v2.4.0
if: github.repository_owner != 'kubesphere'
with:
file: config/dockerfiles/controller-manager/Dockerfile
tags: ${{ steps.metaContributors.outputs.tags }}
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.metaContributors.outputs.labels }}
platforms: linux/amd64,linux/arm64
BuildAPIServer:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Docker meta for kubesphere
id: meta
if: github.repository_owner == 'kubesphere'
uses: docker/metadata-action@v3
with:
images: |
kubespheredev/devops-apiserver
ghcr.io/${{ github.repository_owner }}/devops-apiserver
tags: |
type=schedule,pattern=nightly-{{date 'YYYYMMDD'}}
type=raw,enable=true,value=nightly-{{date 'YYYYMMDD'}}
- name: Docker meta for Contributors
id: metaContributors
if: github.repository_owner != 'kubesphere'
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ github.repository_owner }}/devops-apiserver
tags: |
type=schedule,pattern=nightly-{{date 'YYYYMMDD'}}
type=raw,enable=true,value=nightly-{{date 'YYYYMMDD'}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_SECRETS }}
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v2.4.0
if: github.repository_owner == 'kubesphere'
with:
file: config/dockerfiles/apiserver/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
- name: Build and push Docker images for Contributors
uses: docker/build-push-action@v2.4.0
if: github.repository_owner != 'kubesphere'
with:
file: config/dockerfiles/apiserver/Dockerfile
tags: ${{ steps.metaContributors.outputs.tags }}
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.metaContributors.outputs.labels }}
platforms: linux/amd64,linux/arm64
BuildTools:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Docker meta for kubesphere
id: meta
if: github.repository_owner == 'kubesphere'
uses: docker/metadata-action@v3
with:
images: |
kubespheredev/devops-tools
ghcr.io/${{ github.repository_owner }}/devops-tools
tags: |
type=schedule,pattern=nightly-{{date 'YYYYMMDD'}}
type=raw,enable=true,value=nightly-{{date 'YYYYMMDD'}}
- name: Docker meta for Contributors
id: metaContributors
if: github.repository_owner != 'kubesphere'
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ github.repository_owner }}/devops-tools
tags: |
type=schedule,pattern=nightly-{{date 'YYYYMMDD'}}
type=raw,enable=true,value=nightly-{{date 'YYYYMMDD'}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_SECRETS }}
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v2.4.0
if: github.repository_owner == 'kubesphere'
with:
file: config/dockerfiles/tools/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
- name: Build and push Docker images for Contributors
uses: docker/build-push-action@v2.4.0
if: github.repository_owner != 'kubesphere'
with:
file: config/dockerfiles/tools/Dockerfile
tags: ${{ steps.metaContributors.outputs.tags }}
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.metaContributors.outputs.labels }}
platforms: linux/amd64,linux/arm64