Replicate workflows from crossplane/crossplane
Signed-off-by: Nic Cope <negz@rk0n.org>
This commit is contained in:
parent
7dc335b271
commit
673f131abc
|
|
@ -46,6 +46,17 @@ jobs:
|
|||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Find the Go Build Cache
|
||||
id: go
|
||||
run: echo "::set-output name=cache::$(go env GOCACHE)"
|
||||
|
||||
- name: Cache the Go Build Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.go.outputs.cache }}
|
||||
key: ${{ runner.os }}-build-lint-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: ${{ runner.os }}-build-lint-
|
||||
|
||||
- name: Cache Go Dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
|
|
@ -81,6 +92,17 @@ jobs:
|
|||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Find the Go Build Cache
|
||||
id: go
|
||||
run: echo "::set-output name=cache::$(go env GOCACHE)"
|
||||
|
||||
- name: Cache the Go Build Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.go.outputs.cache }}
|
||||
key: ${{ runner.os }}-build-check-diff-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: ${{ runner.os }}-build-check-diff-
|
||||
|
||||
- name: Cache Go Dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
|
|
@ -113,6 +135,17 @@ jobs:
|
|||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Find the Go Build Cache
|
||||
id: go
|
||||
run: echo "::set-output name=cache::$(go env GOCACHE)"
|
||||
|
||||
- name: Cache the Go Build Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.go.outputs.cache }}
|
||||
key: ${{ runner.os }}-build-unit-tests-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: ${{ runner.os }}-build-unit-tests-
|
||||
|
||||
- name: Cache Go Dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
|
|
@ -162,6 +195,17 @@ jobs:
|
|||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Find the Go Build Cache
|
||||
id: go
|
||||
run: echo "::set-output name=cache::$(go env GOCACHE)"
|
||||
|
||||
- name: Cache the Go Build Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.go.outputs.cache }}
|
||||
key: ${{ runner.os }}-build-e2e-tests-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: ${{ runner.os }}-build-e2e-tests-
|
||||
|
||||
- name: Cache Go Dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
|
|
@ -213,6 +257,17 @@ jobs:
|
|||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Find the Go Build Cache
|
||||
id: go
|
||||
run: echo "::set-output name=cache::$(go env GOCACHE)"
|
||||
|
||||
- name: Cache the Go Build Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.go.outputs.cache }}
|
||||
key: ${{ runner.os }}-build-publish-artifacts-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: ${{ runner.os }}-build-publish-artifacts-
|
||||
|
||||
- name: Cache Go Dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -31,6 +31,13 @@ jobs:
|
|||
- name: Fetch History
|
||||
run: git fetch --prune --unshallow
|
||||
|
||||
- name: Login to Docker
|
||||
uses: docker/login-action@v1
|
||||
if: env.DOCKER_USR != ''
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USR }}
|
||||
password: ${{ secrets.DOCKER_PSW }}
|
||||
|
||||
- name: Promote Artifacts in S3 and Docker Hub
|
||||
if: env.AWS_USR != '' && env.DOCKER_USR != ''
|
||||
run: make -j2 promote BRANCH_NAME=${GITHUB_REF##*/}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@ on:
|
|||
version:
|
||||
description: 'Release version (e.g. v0.1.0)'
|
||||
required: true
|
||||
message:
|
||||
description: 'Tag message'
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
create-tag:
|
||||
|
|
@ -14,14 +17,10 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Fetch History
|
||||
run: git fetch --prune --unshallow
|
||||
|
||||
- name: Create Tag
|
||||
run: make -j2 tag
|
||||
env:
|
||||
VERSION: ${{ github.event.inputs.version }}
|
||||
|
||||
uses: negz/create-tag@v1
|
||||
with:
|
||||
version: ${{ github.event.inputs.version }}
|
||||
message: ${{ github.event.inputs.message }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
Loading…
Reference in New Issue