Skip to content

Commit 94e16cf

Browse files
committed
Changed reusing workflow into composite action
1 parent ba6d047 commit 94e16cf

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

.github/workflows/start_server.yml renamed to .github/actions/start-hashtopolis/action.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
name: Start Hashtopolis server
2+
description: Starts application containers and waits for Hashtopolis to be ready.
23

3-
on:
4-
workflow_call:
5-
6-
jobs:
7-
start-hashtopolis:
8-
runs-on: ubuntu-latest
9-
4+
runs:
5+
using: "composite"
106
steps:
11-
- name: Checkout repository
12-
uses: actions/checkout@v3
137
- name: Start application containers
148
working-directory: .devcontainer
159
run: docker compose up -d

.github/workflows/ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ on:
1111
- dev
1212

1313
jobs:
14-
start-hashtopolis:
15-
uses: ./.github/workflows/start_server.yml
1614
build:
17-
needs: start-hashtopolis
1815
runs-on: ubuntu-latest
1916
steps:
2017
- name: Checkout repository
2118
uses: actions/checkout@v3
19+
- name: Start Hashtopolis server
20+
uses: ./.github/actions/start-hashtopolis
2221
- name: Give Apache permissions on necessary directories # for the tests, only src/files and src/inc/utils/locks seem necessary
2322
run: docker exec -u root hashtopolis-server-dev bash -c "chown -R www-data:www-data /var/www/html/src && chmod -R g+w /var/www/html/src"
2423
- name: Run test suite

.github/workflows/docs.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ on:
55
branches:
66
- docs
77
jobs:
8-
start-hashtopolis:
9-
uses: ./.github/workflows/start_server.yml
108
build:
11-
needs: start-hashtopolis
129
runs-on: ubuntu-latest
1310

1411
steps:
@@ -28,6 +25,8 @@ jobs:
2825
sudo apt-get install nodejs
2926
sudo apt-get install npm
3027
sudo npm i openapi-to-md -g
28+
- name: Start Hashtopolis server
29+
uses: ./.github/actions/start-hashtopolis
3130
- name: Download newest apiv2 spec
3231
run: |
3332
wget http://localhost:8080/api/v2/openapi.json -P /tmp/

0 commit comments

Comments
 (0)