feat(workflow): add digest-bearing image publication workflows #30
This file contains hidden or 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: Sailr Workflow - ci | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| run_ci_build: | |
| description: "Run experimental ci-build profile" | |
| required: false | |
| default: "false" | |
| run_staging_deploy: | |
| description: "Run staging deploy workflow" | |
| required: false | |
| default: "false" | |
| jobs: | |
| sailr-workflow: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| profile: | |
| - ci | |
| - ci-build-plan | |
| - ci-build-push-plan | |
| - ci-generate | |
| - ci-deploy-plan | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Sailr | |
| run: cargo install --path . | |
| - name: Run Sailr workflow profile | |
| run: sailr workflow run ${{ matrix.profile }} --non-interactive | |
| sailr-ci-build: | |
| if: github.event_name == 'workflow_dispatch' && inputs.run_ci_build == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Sailr | |
| run: cargo install --path . | |
| - name: Run experimental CI build | |
| run: sailr workflow run ci-build --non-interactive | |
| staging-deploy: | |
| if: github.event_name == 'workflow_dispatch' && inputs.run_staging_deploy == 'true' | |
| environment: staging | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Sailr | |
| run: cargo install --path . | |
| - name: Configure kubeconfig | |
| run: | | |
| mkdir -p ~/.kube | |
| echo "${{ secrets.STAGING_KUBECONFIG }}" > ~/.kube/config | |
| chmod 600 ~/.kube/config | |
| - name: Run staging deploy | |
| run: sailr workflow run staging-deploy --non-interactive --apply | |
| - name: Upload Sailr report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sailr-staging-deploy-report | |
| path: .sailr/reports/staging-deploy/latest.json | |