File tree Expand file tree Collapse file tree 3 files changed +50
-1
lines changed Expand file tree Collapse file tree 3 files changed +50
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Run Bash Script on Multiple Distributions
2
+
3
+ on :
4
+ push :
5
+ paths :
6
+ - " scripts/**"
7
+ - " Makefile"
8
+ branches :
9
+ - main
10
+ pull_request :
11
+ paths :
12
+ - " scripts/**"
13
+ - " Makefile"
14
+
15
+ jobs :
16
+ run-script :
17
+ name : Run Bash Script
18
+ strategy :
19
+ matrix :
20
+ # Fedora is not an option yet
21
+ os : [ubuntu-latest, ubuntu-22.04]
22
+ runs-on : ${{ matrix.os }}
23
+
24
+ steps :
25
+ - name : Checkout Repository
26
+ uses : actions/checkout@v4
27
+
28
+ - name : Install Podman on Ubuntu
29
+ if : contains(matrix.os, 'ubuntu')
30
+ run : |
31
+ sudo apt-get update
32
+ sudo apt-get install -y podman
33
+
34
+ # Currently we do not do MacOSX as it is not free, maybe in the future
35
+ # - name: Install Podman on macOS
36
+ # if: contains(matrix.os, 'macos')
37
+ # run: |
38
+ # brew install podman
39
+ # podman machine init
40
+ # podman machine start
41
+
42
+ - name : Verify Podman Installation
43
+ run : podman --version
44
+
45
+ - name : Run pattern.sh script
46
+ run : |
47
+ export TARGET_BRANCH=main
48
+ ./scripts/pattern-util.sh make validate-origin
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ TARGET_ORIGIN ?= origin
18
18
# This is because we expect to use tokens for repo authentication as opposed to SSH keys
19
19
TARGET_REPO =$(shell git ls-remote --get-url --symref $(TARGET_ORIGIN ) | sed -e 's/.* URL:[[:space:]]* //' -e 's% ^git@%% ' -e 's% ^https://%% ' -e 's% :% /% ' -e 's% ^% https://% ')
20
20
# git branch --show-current is also available as of git 2.22, but we will use this for compatibility
21
- TARGET_BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
21
+ TARGET_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
22
22
23
23
UUID_FILE ?= ~/.config/validated-patterns/pattern-uuid
24
24
UUID_HELM_OPTS ?=
Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ podman run -it --rm --pull=newer \
88
88
-e EXTRA_PLAYBOOK_OPTS \
89
89
-e TARGET_ORIGIN \
90
90
-e TARGET_SITE \
91
+ -e TARGET_BRANCH \
91
92
-e NAME \
92
93
-e TOKEN_SECRET \
93
94
-e TOKEN_NAMESPACE \
You can’t perform that action at this time.
0 commit comments