-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH Actions: Added jobs for linting and building Docker image
Signed-off-by: Grzegorz Latosinski <[email protected]>
- Loading branch information
1 parent
08d9f54
commit f96f909
Showing
3 changed files
with
53 additions
and
22 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Build and publish Docker image for the project | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
Docker: | ||
if: github.repository == 'antmicro/dl-in-iot-course' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel previous run | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
- name: Build Docker image | ||
run: docker build . --tag ghcr.io/${{ github.repository }} | ||
- name: Login to registry | ||
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ github.token }} | ||
- name: Push image to registry | ||
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' | ||
run: docker push ghcr.io/${{ github.repository }} |
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
name: pre-commit checks | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
- name: Run pre-commit | ||
uses: pre-commit/[email protected] |