-
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.
reogranise build actions for docker build
- Loading branch information
Showing
8 changed files
with
140 additions
and
24 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,47 @@ | ||
name: Build and upload | ||
|
||
on: | ||
push: | ||
branches: ["*"] | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
concierge-graphql: | ||
runs-on: ubuntu-latest | ||
|
||
# The first two permissions are needed to interact with GitHub's OIDC Token endpoint. | ||
# The second set of three permissions are needed to write test results back to GH | ||
permissions: | ||
id-token: write | ||
contents: read | ||
issues: read | ||
checks: write | ||
packages: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Setup JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: corretto | ||
java-version: 17 | ||
cache: sbt | ||
|
||
- name: Build and test | ||
env: | ||
SBT_JUNIT_OUTPUT: ./junit-tests | ||
JAVA_OPTS: -Dsbt.log.noformat=true | ||
BUILD_NUMBER: ${{ github.run_number }} | ||
run: | | ||
sbt 'test;docker:publishLocal' | ||
- name: Publish Unit Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v1 | ||
if: always() #runs even if there is a test failure | ||
with: | ||
files: junit-tests/*.xml |
8 changes: 4 additions & 4 deletions
8
.github/workflows/build.yml → .github/workflows/gnm-style.yml
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,48 @@ | ||
name: GraphiQL explorer | ||
|
||
on: | ||
push: | ||
branches: ["*"] | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
concierge-graphql: | ||
runs-on: ubuntu-latest | ||
|
||
# The first two permissions are needed to interact with GitHub's OIDC Token endpoint. | ||
# The second set of three permissions are needed to write test results back to GH | ||
permissions: | ||
id-token: write | ||
contents: read | ||
issues: read | ||
checks: write | ||
packages: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
cache: 'yarn' | ||
cache-dependency-path: explorer/yarn.lock | ||
|
||
- run: yarn install --frozen-lockfile | ||
name: Prepare to build explorer | ||
working-directory: explorer | ||
|
||
- run: yarn build | ||
name: Build explorer | ||
working-directory: explorer | ||
|
||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
working-directory: explorer | ||
with: | ||
push: true | ||
tags: ghcr.io/guardian/concierge-graphql/graphiql-explorer:${{ github.run_number }} |
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
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,3 @@ | ||
FROM nginx:mainline-alpine | ||
|
||
COPY build/* /usr/share/nginx/html |
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,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ -d build/ ]; then | ||
rm -rf build | ||
fi | ||
|
||
yarn --frozen-lockfile | ||
yarn run build | ||
docker build . -t graphiql-explorer:DEV |
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