Skip to content

Commit

Permalink
Changed reusing workflow into composite action
Browse files Browse the repository at this point in the history
  • Loading branch information
jessevz committed Jan 16, 2025
1 parent ba6d047 commit 94e16cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
name: Start Hashtopolis server
description: Starts application containers and waits for Hashtopolis to be ready.

on:
workflow_call:

jobs:
start-hashtopolis:
runs-on: ubuntu-latest

runs:
using: "composite"
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Start application containers
working-directory: .devcontainer
run: docker compose up -d
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ on:
- dev

jobs:
start-hashtopolis:
uses: ./.github/workflows/start_server.yml
build:
needs: start-hashtopolis
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Start Hashtopolis server
uses: ./.github/actions/start-hashtopolis
- name: Give Apache permissions on necessary directories # for the tests, only src/files and src/inc/utils/locks seem necessary
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"
- name: Run test suite
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ on:
branches:
- docs
jobs:
start-hashtopolis:
uses: ./.github/workflows/start_server.yml
build:
needs: start-hashtopolis
runs-on: ubuntu-latest

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

0 comments on commit 94e16cf

Please sign in to comment.