Skip to content

Commit

Permalink
Update nightly build
Browse files Browse the repository at this point in the history
  • Loading branch information
SaschaSchwarze0 committed Oct 1, 2021
1 parent 3dc1e19 commit bfc7e15
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,27 @@ on:

schedule:
- cron: '0 5 * * *' # 5 AM UTC = Midnight EST
push:
branches:
- sascha-nightly-updates

jobs:
nightly:
if: ${{ github.repository == 'shipwright-io/build' }}
#if: ${{ github.repository == 'shipwright-io/build' }}
runs-on: ubuntu-latest
env:
IMAGE_HOST: registry.saschaschwarze.de
IMAGE_NAMESPACE: shipwright-test
steps:
- uses: actions/checkout@v2

- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d-%s')"

- name: Install crane
run: curl --fail --silent --location https://github.com/google/go-containerregistry/releases/download/v0.6.0/go-containerregistry_Linux_x86_64.tar.gz | tar -xzf - -C /usr/local/bin crane

- name: Install Go
uses: actions/setup-go@v2
with:
Expand All @@ -29,8 +38,6 @@ jobs:
env:
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
IMAGE_HOST: quay.io
IMAGE: shipwright/shipwright-operator
TAG: "nightly-${{ steps.date.outputs.date }}"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand All @@ -41,3 +48,13 @@ jobs:
mv release-debug.yaml nightly-${{ steps.date.outputs.date }}-debug.yaml
gh release upload nightly nightly-${{ steps.date.outputs.date }}-debug.yaml
- name: Update latest tag of supporting images
run: |
crane copy "${IMAGE_HOST}/${IMAGE_NAMESPACE}/bundle:${{ steps.date.outputs.date }}" "${IMAGE_HOST}/${IMAGE_NAMESPACE}/bundle:latest"
crane copy "${IMAGE_HOST}/${IMAGE_NAMESPACE}/git:${{ steps.date.outputs.date }}" "${IMAGE_HOST}/${IMAGE_NAMESPACE}/git:latest"
crane copy "${IMAGE_HOST}/${IMAGE_NAMESPACE}/mutate-image:${{ steps.date.outputs.date }}" "${IMAGE_HOST}/${IMAGE_NAMESPACE}/mutate-image:latest"
- name: Package sample build strategies
run: |
ko resolve samples/buildstrategies > nightly-${{ steps.date.outputs.date }}-strategies.yaml
gh release upload nightly nightly-${{ steps.date.outputs.date }}-strategies.yaml

0 comments on commit bfc7e15

Please sign in to comment.