-
Notifications
You must be signed in to change notification settings - Fork 9
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
Showing
51 changed files
with
4,390 additions
and
2,637 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,57 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
ref: | ||
description: The reference to build | ||
type: string | ||
required: true | ||
image: | ||
description: The name of the image to build | ||
type: string | ||
required: true | ||
context: | ||
description: The context used to build the image | ||
type: string | ||
required: true | ||
stage: | ||
description: The stage to build | ||
type: string | ||
required: false | ||
dockerfile: | ||
description: The path to the Dockerfile | ||
type: string | ||
required: false | ||
outputs: | ||
image-id: | ||
description: The ID of image that has been built | ||
value: ${{ jobs.build.outputs.image-id }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
image-id: ${{ steps.build.outputs.image-id }} | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
|
||
- id: build | ||
name: Build and push | ||
uses: cern-sis/gh-workflows/.github/actions/[email protected] | ||
with: | ||
image: ${{ inputs.image }} | ||
context: ${{ inputs.context }} | ||
stage: ${{ inputs.stage }} | ||
dockerfile: ${{ inputs.dockerfile }} | ||
registry: registry.cern.ch | ||
cache: false | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=ref,event=tag | ||
username: ${{ secrets.HARBOR_USERNAME }} | ||
password: ${{ secrets.HARBOR_SECRET }} |
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,26 @@ | ||
name: Pre-Commit | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
ref: | ||
description: The reference to build | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
linter: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Run pre-commit | ||
uses: pre-commit/[email protected] |
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,12 @@ | ||
name: Pull request master | ||
|
||
on: | ||
pull_request_target: | ||
branches: [master] | ||
|
||
jobs: | ||
pre-commit: | ||
uses: ./.github/workflows/pre-commit.yml | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Push master | ||
|
||
on: workflow_dispatch | ||
# push: | ||
# branches: [master] | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
ref: ${{ inputs.ref }} | ||
image: cern-sis/inspire/classifier | ||
context: . | ||
secrets: inherit | ||
|
||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: send event | ||
uses: cern-sis/gh-workflows/.github/actions/[email protected] | ||
with: | ||
event-type: update | ||
images: | | ||
cern-sis/inspire/classifier@${{ needs.build.outputs.image-id }} | ||
token: ${{ secrets.PAT_FIRE_EVENTS_ON_CERN_SIS_KUBERNETES }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: '24.4.2' | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pycqa/isort | ||
rev: '5.13.2' | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: '7.1.0' | ||
hooks: | ||
- id: flake8 | ||
args: ['--config=setup.cfg'] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.