forked from defenseunicorns/uds-core
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (62 loc) · 2.12 KB
/
slim-dev-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Slim Dev
# This workflow is triggered on pull requests
on:
pull_request:
# milestoned is added here as a workaround for release-please not triggering PR workflows (PRs should be added to a milestone to trigger the workflow).
types: [milestoned, opened, reopened, synchronize]
paths:
- src/pepr/**
- src/keycloak/**
- src/istio/**
- src/prometheus-stack/**
- packages/slim-dev/**
- bundles/k3d-slim-dev/**
- .github/workflows/slim-dev**
# Permissions for the GITHUB_TOKEN used by the workflow.
permissions:
id-token: write # Needed for OIDC-related operations.
contents: read # Allows reading the content of the repository.
pull-requests: read # Allows reading pull request metadata.
# Default settings for all run commands in the workflow jobs.
defaults:
run:
shell: bash -e -o pipefail {0} # Ensures that scripts fail on error and pipefail is set.
# Abort prior jobs in the same workflow / PR
concurrency:
group: test-slim-dev-${{ github.ref }}
cancel-in-progress: true
jobs:
check-only-docs-changes:
runs-on: ubuntu-latest
outputs:
docs_only: ${{ steps.set_output.outputs.docs_only }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Check for non-docs changes
id: docs_check
uses: ./.github/actions/docs-only
with:
base_ref: ${{ github.base_ref }}
- name: Set outputs
id: set_output
run: echo "docs_only=${{ steps.docs_check.outputs.docs_only }}" >> $GITHUB_OUTPUT
test:
needs: check-only-non-docs-changes
if: ${{ needs.check-only-docs-changes.outputs.docs_only == 'false' }}
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Environment setup
uses: ./.github/actions/setup
- name: Deploy Slim Dev Bundle
run: uds run slim-dev --no-progress
- name: Debug Output
if: ${{ always() }}
uses: ./.github/actions/debug-output
- name: Save logs
if: always()
uses: ./.github/actions/save-logs
with:
suffix: -slim-dev