Skip to content

Commit 6e36196

Browse files
committed
Move ifs at the top
1 parent c8bc07b commit 6e36196

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

.github/workflows/eric-continuous-integration.yml

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ concurrency:
1414
cancel-in-progress: true
1515

1616
jobs:
17+
if: ${{ github.repository_owner == 'spring-projects' }}
1718
build-all:
1819
name: Build all modules
1920
runs-on: ubuntu-latest
20-
if: ${{ github.repository_owner == 'spring-projects' }}
2121
steps:
2222
- name: Checkout source code
2323
uses: actions/checkout@v4
@@ -58,7 +58,6 @@ jobs:
5858
name: Test Ollama
5959
runs-on: ubuntu-latest
6060
needs: build-all
61-
if: ${{ github.repository_owner == 'spring-projects' }}
6261
services:
6362
ollama:
6463
image: ollama/ollama:latest
@@ -112,7 +111,6 @@ jobs:
112111
name: Test OpenAI
113112
runs-on: ubuntu-latest
114113
needs: build-all
115-
if: ${{ github.repository_owner == 'spring-projects' }}
116114
steps:
117115
- name: Checkout source code
118116
uses: actions/checkout@v4
@@ -157,7 +155,6 @@ jobs:
157155
name: Test Remaining (MCP, Google GenAI, Chroma, PgVector)
158156
runs-on: ubuntu-latest
159157
needs: build-all
160-
if: ${{ github.repository_owner == 'spring-projects' }}
161158
steps:
162159
- name: Checkout source code
163160
uses: actions/checkout@v4
@@ -202,7 +199,7 @@ jobs:
202199
name: Generate and upload javadocs
203200
runs-on: ubuntu-latest
204201
needs: [build-all, test-ollama, test-openai, test-remaining]
205-
if: ${{ github.repository_owner == 'spring-projects' && github.event_name != 'schedule'}}
202+
if: ${{ github.event_name != 'schedule'}}
206203
steps:
207204
- name: Checkout source code
208205
uses: actions/checkout@v4
@@ -229,31 +226,23 @@ jobs:
229226
run: echo PROJECT_VERSION=$(./mvnw help:evaluate -Dexpression=project.version --quiet -DforceStdout) >> $GITHUB_ENV
230227

231228
- name: Setup SSH key
232-
env:
233-
DOCS_SSH_KEY: ${{ secrets.DOCS_SSH_KEY }}
234-
DOCS_SSH_HOST_KEY: ${{ secrets.DOCS_SSH_HOST_KEY }}
235229
run: |
236230
mkdir "$HOME/.ssh"
237-
echo "$DOCS_SSH_KEY" > "$HOME/.ssh/key"
231+
echo "${{ secrets.DOCS_SSH_KEY }}" > "$HOME/.ssh/key"
238232
chmod 600 "$HOME/.ssh/key"
239-
echo "$DOCS_SSH_HOST_KEY" > "$HOME/.ssh/known_hosts"
233+
echo "${{ secrets.DOCS_SSH_HOST_KEY }}" > "$HOME/.ssh/known_hosts"
240234
241235
- name: Deploy docs
242-
env:
243-
DOCS_HOST: ${{ secrets.DOCS_HOST }}
244-
DOCS_PATH: ${{ secrets.DOCS_PATH }}
245-
DOCS_USERNAME: ${{ secrets.DOCS_USERNAME }}
246-
working-directory: target/site/apidocs
247236
run: |
248-
ssh -i $HOME/.ssh/key $DOCS_USERNAME@$DOCS_HOST "cd $DOCS_PATH && mkdir -p $PROJECT_VERSION"
249-
scp -i $HOME/.ssh/key -r api $DOCS_USERNAME@$DOCS_HOST:$DOCS_PATH/$PROJECT_VERSION
237+
ssh -i $HOME/.ssh/key ${{ secrets.DOCS_USERNAME }}@${{ secrets.DOCS_HOST }} "cd ${{ secrets.DOCS_PATH }} && mkdir -p $PROJECT_VERSION"
238+
scp -i $HOME/.ssh/key -r target/site/apidocs ${{ secrets.DOCS_USERNAME }}@${{ secrets.DOCS_HOST }}:${{ secrets.DOCS_PATH }}/$PROJECT_VERSION
250239
251240
252241
deploy-artifactory:
253242
name: Deploy to Artifactory
254243
runs-on: ubuntu-latest
255244
needs: [build-all, test-ollama, test-openai, test-remaining]
256-
if: ${{ github.repository_owner == 'spring-projects' && github.event_name != 'schedule' }}
245+
if: ${{ github.event_name != 'schedule' }}
257246
steps:
258247
- name: Checkout source code
259248
uses: actions/checkout@v4

0 commit comments

Comments
 (0)