Skip to content

Commit

Permalink
fix: action names
Browse files Browse the repository at this point in the history
  • Loading branch information
francisvaut committed Apr 13, 2024
1 parent ff4ab7f commit 1dea4e0
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 53 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/backend-linting.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
name: backend-linting

on:
push:
branches: [secrets-test]
pull_request:
branches: [main, development, secrets-test]
workflow_dispatch:

jobs:
show-name:
test:
runs-on: self-hosted
steps:
- name: Show username
run: echo ${{ secrets.USERNAME }} | sed 's/./& /g'
- name: Add permission to remove contents of previous action script
run: echo ${{ secrets.SUDO }} | sudo -S chown -R $USER:$USER /home/selab2/actions-runner/_work/UGent-7/
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install --directory=./backend
- name: Execute linting checks
run: flake8 --config ./backend/.flake8 ./backend
44 changes: 22 additions & 22 deletions .github/workflows/deployement.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: deploy
# on:
# push:
# branches:
# - main
# workflow_dispatch:
on:
push:
branches:
- main
workflow_dispatch:

# jobs:
# deploy:
# runs-on: ubuntu-latest
# steps:
# - name: Deploy
# uses: appleboy/ssh-action@master
# with:
# host: ${{ secrets.HOST }}
# username: ${{ secrets.USERNAME }}
# key: ${{ secrets.SSH_KEY }}
# port: ${{ secrets.PORT }}
# script: |
# cd UGent-7
# docker-compose -f production.yml down
# git pull --force
# docker-compose -f production.yml build --no-cache
# docker-compose -f production.yml up -d
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.PORT }}
script: |
cd UGent-7
docker-compose -f production.yml down
git pull --force
docker-compose -f production.yml build --no-cache
docker-compose -f production.yml up -d
26 changes: 13 additions & 13 deletions .github/workflows/frontend-linting.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: frontend-linting

# on:
# pull_request:
# branches: [main, development]
# workflow_dispatch:
on:
pull_request:
branches: [main, development]
workflow_dispatch:

# jobs:
# linting-checks:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Install dependencies
# run: cd frontend; npm install
# - name: Run ESLint
# run: cd frontend; npm run lint
jobs:
linting-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: cd frontend; npm install
- name: Run ESLint
run: cd frontend; npm run lint
26 changes: 13 additions & 13 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: tests

# on:
# pull_request:
# branches: [main, development]
# workflow_dispatch:
on:
pull_request:
branches: [main, development]
workflow_dispatch:

# jobs:
# test:
# runs-on: self-hosted
# steps:
# - name: Add permission to remove contents of previous action script
# run: echo ${{ secrets.SUDO }} | sudo -S chown -R $USER:$USER /home/selab2/actions-runner/_work/UGent-7/
# - uses: actions/checkout@v4
# - name: Run tests
# run: echo ${{ secrets.SUDO }} | sudo -S ./test.sh -c
jobs:
test:
runs-on: self-hosted
steps:
- name: Add permission to remove contents of previous action script
run: echo ${{ secrets.SUDO }} | sudo -S chown -R $USER:$USER /home/selab2/actions-runner/_work/UGent-7/
- uses: actions/checkout@v4
- name: Run tests
run: echo ${{ secrets.SUDO }} | sudo -S ./test.sh -c

0 comments on commit 1dea4e0

Please sign in to comment.