-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
62f0c63
commit 94afdbb
Showing
4 changed files
with
126 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
name: Publish Docker Images | ||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
description: OS | ||
required: false | ||
default: ubuntu-latest | ||
git-ref: | ||
description: Git branch or ref | ||
required: false | ||
default: "" | ||
workflow_call: | ||
inputs: | ||
os: | ||
description: OS | ||
required: false | ||
default: ubuntu-latest | ||
git-ref: | ||
description: Git branch or ref | ||
required: false | ||
default: "" | ||
jobs: | ||
publish-to-docker-hub: | ||
name: Publish Docker Images | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.repository }} | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Login to docker hub | ||
uses: actions-hub/docker/login@master | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Use Docker CLI | ||
uses: actions-hub/docker/cli@master | ||
- name: Build and push Docker images | ||
run: cd docker && ./release_images.sh | ||
publish-to-docker-hub: | ||
name: Publish Docker Images | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.repository }} | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Login to docker hub | ||
uses: actions-hub/docker/login@master | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Use Docker CLI | ||
uses: actions-hub/docker/cli@master | ||
- name: Build and push Docker images | ||
run: cd docker && ./release_images.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
name: Release Package & Docker Images | ||
on: | ||
push: | ||
branches: | ||
- main | ||
# - release | ||
push: | ||
branches: | ||
- main | ||
# - release | ||
jobs: | ||
setup-and-test: | ||
uses: ./.github/workflows/unit-test.yml | ||
with: | ||
os: ubuntu-latest | ||
secrets: inherit | ||
# TODO: WIP | ||
# publish-python-package: | ||
# if: github.repository == 'Admyral-Security/admyral' | ||
# needs: | ||
# - setup-and-test | ||
# uses: ./.github/workflows/publish-to-pypi.yml | ||
# secrets: inherit | ||
publish-docker-images: | ||
if: github.repository == 'Admyral-Security/admyral' | ||
needs: | ||
- setup-and-test | ||
uses: ./.github/workflows/publish-docker-images.yml | ||
secrets: inherit | ||
setup-and-test: | ||
uses: ./.github/workflows/unit-test.yml | ||
with: | ||
os: ubuntu-latest | ||
secrets: inherit | ||
# TODO: WIP | ||
# publish-python-package: | ||
# if: github.repository == 'Admyral-Security/admyral' | ||
# needs: | ||
# - setup-and-test | ||
# uses: ./.github/workflows/publish-to-pypi.yml | ||
# secrets: inherit | ||
publish-docker-images: | ||
if: github.repository == 'Admyral-Security/admyral' | ||
needs: | ||
- setup-and-test | ||
uses: ./.github/workflows/publish-docker-images.yml | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,69 @@ | ||
name: Lint and Unit Tests | ||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
description: OS | ||
required: false | ||
default: ubuntu-latest | ||
type: string | ||
git-ref: | ||
description: Git branch or ref | ||
required: false | ||
default: "" | ||
type: string | ||
workflow_call: | ||
inputs: | ||
os: | ||
description: OS | ||
required: false | ||
default: ubuntu-latest | ||
type: string | ||
git-ref: | ||
description: Git branch or ref | ||
required: false | ||
default: "" | ||
type: string | ||
jobs: | ||
python-unit-test: | ||
name: Python Unit Tests | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.repository }} | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.12 | ||
- name: Install Poetry | ||
uses: snok/[email protected] | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
- name: Install dependencies | ||
run: poetry install | ||
- name: Run linter | ||
run: poetry run ruff format --check | ||
- name: Run linter | ||
run: poetry run ruff check | ||
- name: Run unit tests | ||
run: poetry run pytest tests/ | ||
web-unit-test: | ||
name: Web Unit Tests | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.repository }} | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Install Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 9 | ||
- name: Install dependencies | ||
run: cd web && pnpm install | ||
- name: Run linter | ||
run: cd web && pnpm lint | ||
- name: Run prettier check | ||
run: cd web && pnpm prettier:check | ||
- name: Run build | ||
run: cd web && pnpm build | ||
# TODO: activate when tests are available | ||
# - name: Run unit tests | ||
# run: cd web && pnpm test | ||
python-unit-test: | ||
name: Python Unit Tests | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.repository }} | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.12 | ||
- name: Install Poetry | ||
uses: snok/[email protected] | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
- name: Install dependencies | ||
run: poetry install | ||
- name: Run linter | ||
run: poetry run ruff format --check | ||
- name: Run linter | ||
run: poetry run ruff check | ||
- name: Run unit tests | ||
run: poetry run pytest tests/ | ||
web-unit-test: | ||
name: Web Unit Tests | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.repository }} | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Install Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 9 | ||
- name: Install dependencies | ||
run: cd web && pnpm install | ||
- name: Run linter | ||
run: cd web && pnpm lint | ||
- name: Run prettier check | ||
run: cd web && pnpm prettier:check | ||
- name: Run build | ||
run: cd web && pnpm build | ||
# TODO: activate when tests are available | ||
# - name: Run unit tests | ||
# run: cd web && pnpm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
{ | ||
"tabWidth": 4, | ||
"useTabs": true | ||
"useTabs": true, | ||
"overrides": [ | ||
{ | ||
"files": "*.yml", | ||
"options": { | ||
"tabWidth": 2, | ||
"useTabs": false | ||
} | ||
} | ||
] | ||
} |