Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

Commit

Permalink
Use Reusable GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
Tugark committed Sep 2, 2024
1 parent 4b94aaf commit e39b9c3
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 48 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/docker-dry-run.yml

This file was deleted.

28 changes: 23 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,29 @@ jobs:

docker:
name: Docker
uses: ./.github/workflows/docker-dry-run.yml

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gisktzh/github-actions/docker-dry-run@main
with:
image: gb3-search-api
use-cache-key:
name: Use Cache Key
runs-on: ubuntu-latest
needs: python
steps:
- name: Print Cache Key
run:
echo ${{ needs.python.outputs.cache_key }}
sonarcloud:
name: SonarCloud
uses: ./.github/workflows/sonar-analysis.yml
needs: python
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gisktzh/github-actions/sonarcloud-analysis@main
with:
sonar_token: ${{ secrets.SONAR_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
coverage_file_path: coverage.xml
coverage_cache_key: ${{ needs.python.outputs.cache_key }}
5 changes: 4 additions & 1 deletion .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Tests

on: workflow_call
on:
workflow_call:
outputs:
cache_key: python-coverage-report-${{ github.sha }}-${{ github.run_id }}

env:
PYTHON_VERSION: '3.10'
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/sonar-analysis.yml

This file was deleted.

0 comments on commit e39b9c3

Please sign in to comment.