-
Notifications
You must be signed in to change notification settings - Fork 14
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 #293 from Concordium/workflow-release-frontend
Add release workflow and prepare frontend release
- Loading branch information
Showing
7 changed files
with
104 additions
and
39 deletions.
There are no files selected for viewing
6 changes: 5 additions & 1 deletion
6
.github/workflows/check-format-build.yml → .github/workflows/backend-checks.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
5 changes: 4 additions & 1 deletion
5
.github/workflows/ci.yml → .github/workflows/backend-net-checks.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,41 @@ | ||
name: Check frontend | ||
|
||
on: | ||
push: | ||
branches: main | ||
paths: | ||
- frontend/** | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
branches: [ main ] | ||
paths: | ||
- frontend/** | ||
|
||
env: | ||
NODE_VERSION: "18.18.2" | ||
|
||
jobs: | ||
checks: | ||
name: Formatting and types | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
cache: 'yarn' | ||
cache-dependency-path: frontend/yarn.lock | ||
- name: Install deps | ||
working-directory: frontend | ||
run: yarn install --frozen-lockfile --immutable | ||
- name: Check formatting | ||
working-directory: frontend | ||
run: yarn run formatcheck | ||
- name: Check types | ||
working-directory: frontend | ||
run: yarn run typecheck | ||
# - name: Linting | ||
# working-directory: frontend | ||
# run: yarn run lintcheck |
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: Publish frontend docker image on DockerHub | ||
|
||
on: | ||
push: | ||
tags: | ||
- frontend/* | ||
|
||
jobs: | ||
publish-docker-image: | ||
runs-on: ubuntu-latest | ||
environment: release | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
flavor: latest=false | ||
images: concordium/ccdscan-frontend | ||
tags: type=match,pattern=frontend/(.*),group=1 | ||
- name: Ensure tag matches version in package.json | ||
run: | | ||
EXPECTED=$(jq -r .version frontend/package.json) | ||
EXTRACTED="${{ steps.meta.outputs.version }}" | ||
if [ "$EXPECTED" = "$EXTRACTED" ]; then | ||
printf "Extracted version matches the version in package.json ($EXTRACTED).\n" | ||
exit 0 | ||
else | ||
printf "ERROR: Extracted version does not match the version in package.json. \nExtracted: '$EXTRACTED'\nExpected: '$EXPECTED'\n" | ||
exit 1 | ||
fi | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: ./frontend | ||
file: ./frontend/Dockerfile | ||
push: true | ||
platforms: linux/amd64 | ||
tags: ${{ steps.meta.outputs.tag }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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 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