-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from zaanposni/9-add-pr-checks-and-build-image…
…s-in-github-actions 9 add pr checks and build images in github actions
- Loading branch information
Showing
7 changed files
with
99 additions
and
14 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
* @zaanposni |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Docker | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build frontend | ||
working-directory: ./src/psaggregator | ||
run: docker build -t ghcr.io/${{ github.repository_owner }}/psaggregator_frontend:latest . | ||
|
||
- name: Build nginx | ||
working-directory: ./src/nginx | ||
run: docker build -t ghcr.io/${{ github.repository_owner }}/psaggregator_nginx:latest . | ||
|
||
- name: Build dataimport | ||
working-directory: ./src/dataimport | ||
run: docker build -t ghcr.io/${{ github.repository_owner }}/psaggregator_dataimport:latest . |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: DockerPublish | ||
|
||
on: | ||
push: | ||
branches: | ||
- "master" | ||
|
||
jobs: | ||
DockerPublish: | ||
if: github.repository_owner == 'zaanposni' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Determine version | ||
run: | | ||
VERSION=$(cat ./src/psaggregator/package.json | jq -r '.version') | ||
echo "I found version: $VERSION" | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
- name: Build frontend | ||
working-directory: ./src/psaggregator | ||
run: docker build -t ghcr.io/${{ github.repository_owner }}/psaggregator_frontend:latest -t ghcr.io/${{ github.repository_owner }}/psaggregator_frontend:${{ env.VERSION }} . | ||
|
||
- name: Build nginx | ||
working-directory: ./src/nginx | ||
run: docker build -t ghcr.io/${{ github.repository_owner }}/psaggregator_nginx:latest -t ghcr.io/${{ github.repository_owner }}/psaggregator_nginx:${{ env.VERSION }} . | ||
|
||
- name: Build dataimport | ||
working-directory: ./src/dataimport | ||
run: docker build -t ghcr.io/${{ github.repository_owner }}/psaggregator_dataimport:latest -t ghcr.io/${{ github.repository_owner }}/psaggregator_dataimport:${{ env.VERSION }} . | ||
|
||
- name: Push images | ||
run: | | ||
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u zaanposni --password-stdin | ||
docker push ghcr.io/${{ github.repository_owner }}/psaggregator_frontend:${{ env.VERSION }} | ||
docker push ghcr.io/${{ github.repository_owner }}/psaggregator_nginx:${{ env.VERSION }} | ||
docker push ghcr.io/${{ github.repository_owner }}/psaggregator_dataimport:${{ env.VERSION }} | ||
docker push ghcr.io/${{ github.repository_owner }}/psaggregator_frontend:latest | ||
docker push ghcr.io/${{ github.repository_owner }}/psaggregator_nginx:latest | ||
docker push ghcr.io/${{ github.repository_owner }}/psaggregator_dataimport:latest |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Python | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
working-directory: ./src/dataimport | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pylint | ||
pip install -r requirements.txt | ||
- name: Lint Python code | ||
working-directory: ./src/dataimport | ||
run: | | ||
pylint --errors-only ./*.py |
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
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
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