-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add publish Signed-off-by: Jacob Woffenden <jacob.woffenden@digital.justice.gov.uk>
- Loading branch information
1 parent
7bfcfca
commit 2430d53
Showing
3 changed files
with
108 additions
and
166 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,62 @@ | ||
--- | ||
name: Test and Build | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
permissions: {} # yamllint disable-line | ||
|
||
jobs: | ||
yamllint: | ||
name: YAML Lint | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Run yamllint | ||
id: run_yamllint | ||
uses: actionshub/yamllint@b772a30c3ba90c5f5aadfe94d8f3599e3a7099c8 # v1.8.2 | ||
|
||
markdownlint: | ||
name: Markdown Lint | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Run mdl | ||
id: run_mdl | ||
uses: actionshub/markdownlint@6c82ff529253530dfbf75c37570876c52692835f # v3.1.4 | ||
|
||
build-and-test: | ||
if: github.ref != 'main' | ||
name: Build and Test | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 3 | ||
matrix: | ||
flavour: | ||
- "allspark-notebook" | ||
- "datascience-notebook" | ||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Build and Test | ||
id: build_and_test | ||
shell: bash | ||
run: | | ||
bash scripts/build-and-test.sh "${{ matrix.flavour }}" |
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,46 @@ | ||
--- | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
publish: | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
packages: write | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 3 | ||
matrix: | ||
flavour: | ||
- "allspark-notebook" | ||
- "datascience-notebook" | ||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Log in to GitHub Container Registry | ||
id: login_ghcr | ||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and Push | ||
id: build_and_push | ||
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0 | ||
with: | ||
context: ${{ matrix.flavour }} | ||
file: ${{ matrix.flavour }}/Dockerfile | ||
push: true | ||
tags: ghcr.io/ministryofjustice/analytical-platform-${{ matrix.flavour }}:${{ github.ref_name }} |