Nightly #583
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
name: Nightly | |
on: | |
schedule: | |
- cron: '0 1 * * *' | |
workflow_dispatch: | |
jobs: | |
publish_nightly: | |
uses: rancher-sandbox/highlander-reusable-workflows/.github/workflows/operator-with-latest-rancher-build.yaml@main | |
with: | |
operator_name: aks-operator | |
operator_commit: ${{ github.sha }} | |
publish_images: | |
permissions: | |
packages: write # Required for pushing images to ghcr.io | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Login to GHCR registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0 | |
- name: Set image tag | |
run: echo "TAG=$(date +'%Y%m%d')" >> "$GITHUB_ENV" | |
- name: Build and push image | |
env: | |
REPO: ghcr.io/rancher | |
run: | | |
make image-push | |
publish_charts: | |
permissions: | |
packages: write # Required for pushing charts to ghcr.io | |
runs-on: ubuntu-latest | |
needs: publish_images | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Login to GHCR registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install Helm | |
uses: azure/setup-helm@v4 | |
with: | |
version: 3.8.0 | |
- name: Set image tag | |
run: echo "TAG=$(date +'%Y%m%d')" >> "$GITHUB_ENV" | |
- name: Build charts | |
env: | |
REPO: ghcr.io/rancher # used in the Helm chart values.yaml | |
CHART_VERSION: ${{ env.TAG }} # chart version matches image tag | |
run: | | |
make charts | |
- name: Push charts | |
env: | |
CHART_VERSION: ${{ env.TAG }} # chart version matches image tag | |
run: | | |
helm push bin/rancher-aks-operator-$CHART_VERSION.tgz oci://ghcr.io/${{ github.repository_owner }}/rancher-aks-operator-chart | |
helm push bin/rancher-aks-operator-crd-$CHART_VERSION.tgz oci://ghcr.io/${{ github.repository_owner }}/rancher-aks-operator-crd-chart |