Skip to content
This repository was archived by the owner on Aug 2, 2025. It is now read-only.

Commit 25696d8

Browse files
committed
Fix: Move workflow files around
1 parent 406fe0c commit 25696d8

4 files changed

Lines changed: 100 additions & 139 deletions

File tree

.github/workflows/anchore.yaml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/build-test.yaml

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -10,48 +10,3 @@ permissions:
1010
jobs:
1111
build-test:
1212
runs-on: ubuntu-latest
13-
steps:
14-
- name: Checkout repository
15-
uses: actions/checkout@v4
16-
17-
# Set up Node.js using nvm
18-
- name: Set up Node.js version from .nvmrc
19-
run: |
20-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
21-
export NVM_DIR="$HOME/.nvm"
22-
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
23-
nvm install
24-
nvm use
25-
node -v
26-
npm -v
27-
28-
- name: Set up QEMU
29-
uses: docker/setup-qemu-action@v3
30-
31-
- name: Set up Docker Buildx
32-
uses: docker/setup-buildx-action@v3
33-
34-
- name: Login to Github Container Registry
35-
uses: docker/login-action@v3
36-
with:
37-
registry: ghcr.io
38-
username: ${{ github.repository_owner }}
39-
password: ${{ secrets.GITHUB_TOKEN }}
40-
41-
- name: Generate Docker tags
42-
uses: docker/metadata-action@v5
43-
id: metadata
44-
with:
45-
images: ghcr.io/${{ github.repository }}
46-
tags: |
47-
type=raw,enable=true,priority=200,prefix=,suffix=,value=${{ github.sha }}
48-
49-
- name: Build and Push Docker Images
50-
uses: docker/build-push-action@v6
51-
with:
52-
platforms: linux/amd64,linux/arm64
53-
push: false
54-
tags: ${{ steps.metadata.outputs.tags }}
55-
labels: ${{ steps.metadata.outputs.labels }}
56-
cache-from: type=gha
57-
cache-to: type=gha,mode=max

.github/workflows/codeql.yaml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/workflows/validation.yaml

Lines changed: 100 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,117 @@ jobs:
3636
CodeQL:
3737
needs: validation
3838
runs-on: ubuntu-latest
39+
name: Analyze TypeScript
40+
permissions:
41+
security-events: write
42+
packages: read
43+
actions: read
44+
contents: read
45+
46+
strategy:
47+
fail-fast: false
48+
matrix:
49+
include:
50+
- language: javascript-typescript
51+
build-mode: none
52+
3953
steps:
40-
- name: Checkout
54+
- name: Checkout repository
4155
uses: actions/checkout@v4
4256

43-
- name: CodeQL
44-
uses: ./.github/workflows/codeql.yaml
57+
- name: Initialize CodeQL
58+
uses: github/codeql-action/init@v3
59+
with:
60+
languages: ${{ matrix.language }}
61+
build-mode: ${{ matrix.build-mode }}
62+
queries: security-extended
63+
64+
- if: matrix.build-mode == 'manual'
65+
shell: bash
66+
run: |
67+
echo 'If you are using a "manual" build mode for one or more of the' \
68+
'languages you are analyzing, replace this with the commands to build' \
69+
'your code, for example:'
70+
echo ' make bootstrap'
71+
echo ' make release'
72+
exit 1
73+
74+
- name: Perform CodeQL Analysis
75+
uses: github/codeql-action/analyze@v3
76+
with:
77+
category: "/language:${{ matrix.language }}"
78+
79+
- name: Set Marker for Workflow Completion
80+
run: echo "codeql_complete=true" >> $GITHUB_ENV
4581

4682
Anchore:
4783
needs: validation
4884
runs-on: ubuntu-latest
4985
steps:
50-
- name: Checkout
51-
uses: actions/checkout@v4
86+
- name: Set up Grype installation path
87+
run: echo "$HOME/bin" >> $GITHUB_PATH
88+
89+
- name: Download Grype
90+
run: |
91+
curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b $HOME/bin
92+
93+
- uses: actions/checkout@v4
94+
95+
- name: Build the Container image
96+
run: docker build . --file Dockerfile --tag localbuild/testimage:latest
5297

53-
- name: Anchore
54-
uses: ./.github/workflows/anchore.yaml
98+
- name: Run Grype test
99+
run: grype -o sarif localbuild/testimage:latest > results.sarif
100+
101+
- name: Upload Anchore scan SARIF report
102+
uses: github/codeql-action/upload-sarif@v3
103+
with:
104+
sarif_file: ./results.sarif
55105

56106
test-building:
57107
needs: [CodeQL, Anchore]
58108
runs-on: ubuntu-latest
59109
steps:
60-
- name: Test build
61-
uses: ./.github/workflows/build-test.yaml
110+
- name: Checkout repository
111+
uses: actions/checkout@v4
112+
113+
- name: Set up Node.js version from .nvmrc
114+
run: |
115+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
116+
export NVM_DIR="$HOME/.nvm"
117+
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
118+
nvm install
119+
nvm use
120+
node -v
121+
npm -v
122+
123+
- name: Set up QEMU
124+
uses: docker/setup-qemu-action@v3
125+
126+
- name: Set up Docker Buildx
127+
uses: docker/setup-buildx-action@v3
128+
129+
- name: Login to Github Container Registry
130+
uses: docker/login-action@v3
131+
with:
132+
registry: ghcr.io
133+
username: ${{ github.repository_owner }}
134+
password: ${{ secrets.GITHUB_TOKEN }}
135+
136+
- name: Generate Docker tags
137+
uses: docker/metadata-action@v5
138+
id: metadata
139+
with:
140+
images: ghcr.io/${{ github.repository }}
141+
tags: |
142+
type=raw,enable=true,priority=200,prefix=,suffix=,value=${{ github.sha }}
143+
144+
- name: Build and Push Docker Images
145+
uses: docker/build-push-action@v6
146+
with:
147+
platforms: linux/amd64,linux/arm64
148+
push: false
149+
tags: ${{ steps.metadata.outputs.tags }}
150+
labels: ${{ steps.metadata.outputs.labels }}
151+
cache-from: type=gha
152+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)