Skip to content

CD / Global

CD / Global #39

Workflow file for this run

# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: CD / Global
on:
push:
branches: [ master ]
create:
tags:
- 'v*.*.*'
permissions:
contents: read
jobs:
deploy:
name: Development Release
if: github.event_name == 'push' && contains(github.ref, 'master')
runs-on: ubuntu-latest
env:
NG_CLI_ANALYTICS: ci
GOPROXY: "https://proxy.golang.org"
NODE_OPTIONS: "--max-old-space-size=8192"
DOCKER_CLI_EXPERIMENTAL: enabled
TERM: xterm
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/setup-node@v3
with:
node-version: 16.15.0
- run: yarn
- run: node hack/version.mjs
- run: go mod download
- uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1
- uses: docker/setup-buildx-action@v2
- env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
run: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run: |
export GOPATH=$(go env GOPATH)/bin
make docker-push-head
release:
name: Release
if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
env:
NG_CLI_ANALYTICS: ci
GOPROXY: "https://proxy.golang.org"
NODE_OPTIONS: "--max-old-space-size=8192"
DOCKER_CLI_EXPERIMENTAL: enabled
TERM: xterm
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.15.0
- run: yarn
- run: node hack/version.mjs
- run: go mod download
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- env:
DOCKER_USER: ${{ secrets.DOCKER_RELEASE_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_RELEASE_PASS }}
run: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run: |
export GOPATH=$(go env GOPATH)/bin
make docker-push-release