-
Notifications
You must be signed in to change notification settings - Fork 22
70 lines (66 loc) · 2.1 KB
/
charm-pull-request.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: Pull Request
on:
workflow_call:
inputs:
charm-path:
description: "Path to the charm we want to publish. Defaults to the current working directory."
default: '.'
required: false
type: string
provider:
description: "The provider to choose for either machine or k8s tests ('lxd' or 'microk8s')"
default: 'microk8s'
required: false
type: string
ip-range:
type: string
description: |
The IP range in the address pool for the load balancer to use.
It can be either a subnet(IP/mask) or a range (<IP1>-<IP2>)
required: false
default: ""
secrets:
CHARMHUB_TOKEN:
required: false
jobs:
ci-ignore:
name: Check against ignorelist
runs-on: ubuntu-latest
outputs:
any_modified: ${{ steps.echo-changes.outputs.any_modified }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }} # To be compatible with PRs from forks
fetch-depth: 0
- name: Determine changed files in the PR
id: changed-files
uses: tj-actions/changed-files@v38
with:
files_ignore: |
README.md
CONTRIBUTING.md
INTEGRATING.md
CODEOWNERS
LICENSE
icon.svg
.gitignore
.github/**
- name: Echo changed files
id: echo-changes
run: |
echo "Changes made: ${{ steps.changed-files.outputs.any_modified }}"
echo "Modified files: ${{ steps.changed-files.outputs.all_modified_files }}"
echo "any_modified=${{ steps.changed-files.outputs.any_modified }}" >> $GITHUB_OUTPUT
quality-checks:
name: Quality Checks
needs:
- ci-ignore
if: needs.ci-ignore.outputs.any_modified == 'true'
uses: ./.github/workflows/_charm-quality-checks.yaml@main
secrets: inherit
with:
charm-path: ${{ inputs.charm-path }}
provider: ${{ inputs.provider }}
ip-range: ${{ inputs.ip-range }}