Skip to content

Commit 0c8958d

Browse files
authored
Merge pull request #274 from fluxcd/nightly-builds
2 parents e25d689 + 418fffa commit 0c8958d

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed

.github/workflows/e2e.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
go-version: 1.15.x
2727
- name: Setup Kubernetes
2828
uses: engineerd/setup-kind@v0.5.0
29+
with:
30+
version: "v0.11.1"
2931
- name: Setup Helm
3032
uses: fluxcd/pkg/actions/helm@main
3133
- name: Setup Kustomize

.github/workflows/nightly.yaml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: nightly
2+
on:
3+
schedule:
4+
- cron: '0 0 * * *'
5+
workflow_dispatch:
6+
7+
env:
8+
REPOSITORY: ${{ github.repository }}
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Setup QEMU
16+
uses: docker/setup-qemu-action@v1
17+
with:
18+
platforms: all
19+
- name: Setup Docker Buildx
20+
id: buildx
21+
uses: docker/setup-buildx-action@v1
22+
with:
23+
buildkitd-flags: "--debug"
24+
- name: Build multi-arch container image
25+
uses: docker/build-push-action@v2
26+
with:
27+
push: false
28+
builder: ${{ steps.buildx.outputs.name }}
29+
context: .
30+
file: ./Dockerfile
31+
platforms: linux/amd64,linux/arm/v7,linux/arm64
32+
tags: |
33+
${{ env.REPOSITORY }}:nightly

.github/workflows/release.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ on:
33
push:
44
tags:
55
- 'v*'
6+
workflow_dispatch:
7+
inputs:
8+
tag:
9+
description: 'image tag prefix'
10+
default: 'rc'
11+
required: true
612

713
env:
814
CONTROLLER: ${{ github.event.repository.name }}
@@ -17,7 +23,7 @@ jobs:
1723
- name: Prepare
1824
id: prep
1925
run: |
20-
VERSION=sha-${GITHUB_SHA::8}
26+
VERSION="${{ github.event.inputs.tag }}-${GITHUB_SHA::8}"
2127
if [[ $GITHUB_REF == refs/tags/* ]]; then
2228
VERSION=${GITHUB_REF/refs\/tags\//}
2329
fi
@@ -68,11 +74,13 @@ jobs:
6874
docker pull docker.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
6975
docker pull ghcr.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
7076
- name: Generate release manifests
77+
if: startsWith(github.ref, 'refs/tags/v')
7178
run: |
7279
mkdir -p config/release
7380
kustomize build ./config/crd > ./config/release/${{ env.CONTROLLER }}.crds.yaml
7481
kustomize build ./config/manager > ./config/release/${{ env.CONTROLLER }}.deployment.yaml
7582
- name: Create release
83+
if: startsWith(github.ref, 'refs/tags/v')
7684
uses: ncipollo/release-action@v1
7785
with:
7886
prerelease: true

0 commit comments

Comments
 (0)