-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExhibit-5.yaml
164 lines (164 loc) · 6.94 KB
/
Exhibit-5.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: Precompile and Commit Executable
on:
workflow_dispatch: {}
defaults:
run:
shell: bash
jobs:
build:
runs-on:
- self-hosted
- ${{ matrix.os }}
steps:
- id: create-github-app-token
name: CreateGithubAppToken
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.CREATE_GITHUB_APP_TOKEN_APP_ID }}
private-key: ${{ secrets.CREATE_GITHUB_APP_TOKEN_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- id: required-security-audit_evidence-collection
name: REQUIRED SECURITY AUDIT_EVIDENCE COLLECTION
run: |-
# This is not valid bash syntax. It's pseudocode intended to represent the idea
# of collecting the versions of all tools that are directly used during a workflow
touch history.text
EXISTING_HISTORY_COUNT=`wc -l history.text`
history >> history.text
CURRENT_HISTORY_COUNT=`wc -l history.text`
NEW_HISTORY_COUNT=`[$CURRENT_HISTORY_COUNT - $EXISTING_HISTORY_COUNT]
NEW_HISTORY_LINES=`tail -n $NEW_HISTORY_COUNT history.text`
for $line in $NEW_HISTORY_LINES {
echo `$line.firstComponent --version` >> toolVersions.text
}
- id: checkout
name: Checkout
uses: euc-actions/checkout@v4
with:
token: ${{ steps.create-github-app-token.outputs.token }}
ref: ${{ github.head_ref }}
persist-credentials: 'false'
- id: required-security-audit_evidence-collection
name: REQUIRED SECURITY AUDIT_EVIDENCE COLLECTION
run: |-
# This is not valid bash syntax. It's pseudocode intended to represent the idea
# of collecting the versions of all tools that are directly used during a workflow
touch history.text
EXISTING_HISTORY_COUNT=`wc -l history.text`
history >> history.text
CURRENT_HISTORY_COUNT=`wc -l history.text`
NEW_HISTORY_COUNT=`[$CURRENT_HISTORY_COUNT - $EXISTING_HISTORY_COUNT]
NEW_HISTORY_LINES=`tail -n $NEW_HISTORY_COUNT history.text`
for $line in $NEW_HISTORY_LINES {
echo `$line.firstComponent --version` >> toolVersions.text
}
- id: github-access-action
name: GithubAccessAction
uses: euc-uem/github-access-action@v3
with:
action-target-org: ${{ github.repository_owner }}
app-access-token: ${{ steps.create-github-app-token.outputs.token }}
- id: required-security-audit_evidence-collection
name: REQUIRED SECURITY AUDIT_EVIDENCE COLLECTION
run: |-
# This is not valid bash syntax. It's pseudocode intended to represent the idea
# of collecting the versions of all tools that are directly used during a workflow
touch history.text
EXISTING_HISTORY_COUNT=`wc -l history.text`
history >> history.text
CURRENT_HISTORY_COUNT=`wc -l history.text`
NEW_HISTORY_COUNT=`[$CURRENT_HISTORY_COUNT - $EXISTING_HISTORY_COUNT]
NEW_HISTORY_LINES=`tail -n $NEW_HISTORY_COUNT history.text`
for $line in $NEW_HISTORY_LINES {
echo `$line.firstComponent --version` >> toolVersions.text
}
- id: set-osstring
name: SET OSSTRING
run: |-
OS=${{ matrix.os }}
if [[ $OS == "winbuild-gh" ]];
then OS=Windows
fi
echo OSDIR=$OS >> $GITHUB_ENV
- id: required-security-audit_evidence-collection
name: REQUIRED SECURITY AUDIT_EVIDENCE COLLECTION
run: |-
# This is not valid bash syntax. It's pseudocode intended to represent the idea
# of collecting the versions of all tools that are directly used during a workflow
touch history.text
EXISTING_HISTORY_COUNT=`wc -l history.text`
history >> history.text
CURRENT_HISTORY_COUNT=`wc -l history.text`
NEW_HISTORY_COUNT=`[$CURRENT_HISTORY_COUNT - $EXISTING_HISTORY_COUNT]
NEW_HISTORY_LINES=`tail -n $NEW_HISTORY_COUNT history.text`
for $line in $NEW_HISTORY_LINES {
echo `$line.firstComponent --version` >> toolVersions.text
}
- id: build-swift-package-mac-linux
if: runner.os != 'Windows'
name: Build Swift Package (Mac/Linux)
run: |-
swift build --scratch-path bin
- id: required-security-audit_evidence-collection
name: REQUIRED SECURITY AUDIT_EVIDENCE COLLECTION
run: |-
# This is not valid bash syntax. It's pseudocode intended to represent the idea
# of collecting the versions of all tools that are directly used during a workflow
touch history.text
EXISTING_HISTORY_COUNT=`wc -l history.text`
history >> history.text
CURRENT_HISTORY_COUNT=`wc -l history.text`
NEW_HISTORY_COUNT=`[$CURRENT_HISTORY_COUNT - $EXISTING_HISTORY_COUNT]
NEW_HISTORY_LINES=`tail -n $NEW_HISTORY_COUNT history.text`
for $line in $NEW_HISTORY_LINES {
echo `$line.firstComponent --version` >> toolVersions.text
}
- id: move-executable-to-bin
name: MOVE EXECUTABLE TO BIN
run: |-
BINDIR=$(swift build --scratch-path bin --show-bin-path)
echo $BINDIR
SOURCEDIR=${BINDIR}/fossa-action
echo $SOURCEDIR
DESTDIR=${BINDIR%bin/*}bin/$OSDIR/fossa-action
echo $DESTDIR
mv $SOURCEDIR $DESTDIR
- id: required-security-audit_evidence-collection
name: REQUIRED SECURITY AUDIT_EVIDENCE COLLECTION
run: |-
# This is not valid bash syntax. It's pseudocode intended to represent the idea
# of collecting the versions of all tools that are directly used during a workflow
touch history.text
EXISTING_HISTORY_COUNT=`wc -l history.text`
history >> history.text
CURRENT_HISTORY_COUNT=`wc -l history.text`
NEW_HISTORY_COUNT=`[$CURRENT_HISTORY_COUNT - $EXISTING_HISTORY_COUNT]
NEW_HISTORY_LINES=`tail -n $NEW_HISTORY_COUNT history.text`
for $line in $NEW_HISTORY_LINES {
echo `$line.firstComponent --version` >> toolVersions.text
}
- id: commit-executable-via-lfs
name: COMMIT EXECUTABLE VIA LFS
run: |-
git lfs install
git add bin/$OSDIR/fossa-action
git commit -m "Commit Executables"
git push origin ${{ github.ref_name }}
- id: required-security-audit_evidence-collection
name: REQUIRED SECURITY AUDIT_EVIDENCE COLLECTION
run: |-
# This is not valid bash syntax. It's pseudocode intended to represent the idea
# of collecting the versions of all tools that are directly used during a workflow
touch history.text
EXISTING_HISTORY_COUNT=`wc -l history.text`
history >> history.text
CURRENT_HISTORY_COUNT=`wc -l history.text`
NEW_HISTORY_COUNT=`[$CURRENT_HISTORY_COUNT - $EXISTING_HISTORY_COUNT]
NEW_HISTORY_LINES=`tail -n $NEW_HISTORY_COUNT history.text`
for $line in $NEW_HISTORY_LINES {
echo `$line.firstComponent --version` >> toolVersions.text
}
strategy:
matrix:
os:
- macOS