Skip to content

fixed the bug with downloading multi-branch-pipeline artifacts (#973) #58

fixed the bug with downloading multi-branch-pipeline artifacts (#973)

fixed the bug with downloading multi-branch-pipeline artifacts (#973) #58

Workflow file for this run

name: LatestBuild
on:
push:
branches:
- 'release-*'
pull_request:
branches:
- 'release-*'
jobs:
check:
runs-on: ubuntu-20.04
outputs:
status: ${{ steps.early.outputs.status}}
steps:
- name: Early exit
id: early
run: |
if [ "${{ secrets.GHCR_TOKEN }}" != "" ]
then
echo "::set-output name=status::success"
else
echo "::set-output name=status::fail"
fi
BuildController:
needs:
- check
if: needs.check.outputs.status == 'success'
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/kubesphere-sigs/devops-controller
tags: |
type=schedule,pattern=${{ github.ref_name }}
type=raw,enable=true,value=${{ github.ref_name }}
- 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=${{ github.ref_name }}
type=raw,enable=true,value=${{ github.ref_name }}
- 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.repository_owner == 'kubesphere'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_SECRETS }}
- name: Login to GHCR
if: github.repository_owner == 'kubesphere'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: kubesphere-sigs
password: ${{ secrets.GHCR_TOKEN }}
- name: login to GHCR for Contributors
if: github.repository_owner != 'kubesphere'
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/[email protected]
if: github.repository_owner == 'kubesphere'
with:
file: config/dockerfiles/controller-manager/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
push: true
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
- name: Build and push Docker images for Contributors
uses: docker/[email protected]
if: github.repository_owner != 'kubesphere'
with:
file: config/dockerfiles/controller-manager/Dockerfile
tags: ${{ steps.metaContributors.outputs.tags }}
push: true
labels: ${{ steps.metaContributors.outputs.labels }}
platforms: linux/amd64,linux/arm64
BuildAPIServer:
needs:
- check
if: needs.check.outputs.status == 'success'
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/kubesphere-sigs/devops-apiserver
tags: |
type=schedule,pattern=${{ github.ref_name }}
type=raw,enable=true,value=${{ github.ref_name }}
- 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=${{ github.ref_name }}
type=raw,enable=true,value=${{ github.ref_name }}
- 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.repository_owner == 'kubesphere'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_SECRETS }}
- name: Login to GHCR
if: github.repository_owner == 'kubesphere'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: kubesphere-sigs
password: ${{ secrets.GHCR_TOKEN }}
- name: login to GHCR for Contributors
if: github.repository_owner != 'kubesphere'
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/[email protected]
if: github.repository_owner == 'kubesphere'
with:
file: config/dockerfiles/apiserver/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
push: true
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
- name: Build and push Docker images for Contributors
uses: docker/[email protected]
if: github.repository_owner != 'kubesphere'
with:
file: config/dockerfiles/apiserver/Dockerfile
tags: ${{ steps.metaContributors.outputs.tags }}
push: true
labels: ${{ steps.metaContributors.outputs.labels }}
platforms: linux/amd64,linux/arm64
BuildTools:
needs:
- check
if: needs.check.outputs.status == 'success'
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/kubesphere-sigs/devops-tools
tags: |
type=schedule,pattern=${{ github.ref_name }}
type=raw,enable=true,value=${{ github.ref_name }}
- 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=${{ github.ref_name }}
type=raw,enable=true,value=${{ github.ref_name }}
- 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.repository_owner == 'kubesphere'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_SECRETS }}
- name: Login to GHCR
if: github.repository_owner == 'kubesphere'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: kubesphere-sigs
password: ${{ secrets.GHCR_TOKEN }}
- name: login to GHCR for Contributors
if: github.repository_owner != 'kubesphere'
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/[email protected]
if: github.repository_owner == 'kubesphere'
with:
file: config/dockerfiles/tools/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
push: true
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
- name: Build and push Docker images for Contributors
uses: docker/[email protected]
if: github.repository_owner != 'kubesphere'
with:
file: config/dockerfiles/tools/Dockerfile
tags: ${{ steps.metaContributors.outputs.tags }}
push: true
labels: ${{ steps.metaContributors.outputs.labels }}
platforms: linux/amd64,linux/arm64
SyncImagesforKubeSphere:
needs:
- BuildController
- BuildAPIServer
- BuildTools
runs-on: ubuntu-latest
if: github.repository == 'kubesphere/ks-devops'
steps:
- uses: actions/checkout@v2
- name: install dependiencies
run: |
sudo apt update
sudo apt install skopeo -y
- name: sync images for KubeSphere
run: |
skopeo login docker.io -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_SECRETS }}
skopeo copy docker://docker.io/kubespheredev/devops-controller:${{ github.ref_name }} docker://docker.io/kubespheredev/devops-controller:ks-${{ github.ref_name }} --all
skopeo copy docker://docker.io/kubespheredev/devops-apiserver:${{ github.ref_name }} docker://docker.io/kubespheredev/devops-apiserver:ks-${{ github.ref_name }} --all
skopeo copy docker://docker.io/kubespheredev/devops-tools:${{ github.ref_name }} docker://docker.io/kubespheredev/devops-tools:ks-${{ github.ref_name }} --all