-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update the weekly build github action
Updates the weekly build github action to call a second workflow. This will allow us to trigger a build for red-hat-storage/topolvm as part of the weekly build. Signed-off-by: N Balachandran <nibalach@redhat.com>
- Loading branch information
Showing
2 changed files
with
45 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,18 @@ | ||
name: LVMO Weekly Image Publish | ||
name: weekly-image-build | ||
|
||
# Runs every Monday at 23:00 UTC | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 23 * * 1" | ||
env: | ||
GO_VERSION: "1.18" | ||
IMG: "quay.io/ocs-dev/lvm-operator:weekly" | ||
|
||
jobs: | ||
build-and-publish-image: | ||
name: Build and publish the LVMO image | ||
publish-image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v2 | ||
- name: invoke-operator-build | ||
uses: benc-uk/workflow-dispatch@v1 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
# 'test' is a sub-target of 'docker-build' and so cache go build & mod | ||
- id: go-cache-paths | ||
run: | | ||
echo "::set-output name=go-build::$(go env GOCACHE)" | ||
echo "::set-output name=go-mod::$(go env GOMODCACHE)" | ||
- name: Go Build Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.go-cache-paths.outputs.go-build }} | ||
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | ||
|
||
- name: Go Mod Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.go-cache-paths.outputs.go-mod }} | ||
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} | ||
|
||
- name: Login to quay | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_LVMO_ROBOT_NAME }} | ||
password: ${{ secrets.QUAY_LVMO_ROBOT_TOKEN }} | ||
|
||
- name: Build operator docker image | ||
run: make docker-build-combined IMG=${{env.IMG}} | ||
|
||
- name: Publish operator image | ||
run: make docker-push IMG=${{env.IMG}} | ||
workflow: manual-operator-build-push | ||
repo: red-hat-storage/lvm-operator | ||
inputs: '{ "branch": "main" }' |