Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full support for HTTP/2 #29

Merged
merged 3 commits into from
Mar 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 1 addition & 77 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,55 +41,6 @@ jobs:
name: core-executable
path: .artifacts/core-executable

build-api:
name: 🔨 Build API
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: "14"
- run: make api
- uses: actions/upload-artifact@v2
with:
name: api-executable
path: .artifacts/api-executable

bundle-api:
name: 🐳 Push API to GHCR
runs-on: ubuntu-latest
needs: build-api
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: api-executable
path: .artifacts/api-executable
- name: Prepare
id: prep
run: |
DOCKER_IMAGE=ghcr.io/tilblechschmidt/webgrid/api
TAGS="${DOCKER_IMAGE}:sha-${GITHUB_SHA::8}"
echo "tags=${TAGS}" >> $GITHUB_ENV
echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Build and push webgrid/api Docker image
uses: docker/build-push-action@v2
with:
context: .
file: distribution/docker/images/api/Dockerfile
tags: ${{ env.tags }}
push: true
labels: |
org.opencontainers.image.source=${{ github.event.repository.html_url }}
org.opencontainers.image.created=${{ env.created }}
org.opencontainers.image.revision=${{ github.sha }}

bundle-core:
name: 🐳 Push Core to GHCR
runs-on: ubuntu-latest
Expand Down Expand Up @@ -172,7 +123,6 @@ jobs:
needs:
- bundle-core
- bundle-node
- bundle-api
steps:
- uses: actions/checkout@v2
- name: Login to GHCR
Expand Down Expand Up @@ -202,7 +152,6 @@ jobs:
needs:
- bundle-core
- bundle-node
- bundle-api
steps:
- uses: actions/checkout@v2
- name: Install dependencies
Expand Down Expand Up @@ -246,7 +195,6 @@ jobs:
name: 🐳 Publish Images to DockerHub
runs-on: ubuntu-latest
needs:
- bundle-api
- bundle-core
- bundle-node
- kubernetes-integration
Expand All @@ -269,15 +217,6 @@ jobs:
SRC_IMAGE=${{ env.SRC_REPOSITORY }}/core:${{ env.SRC_TAG }}
DST_IMAGE=${{ env.DST_REPOSITORY }}/core:${{ env.DST_TAG }}

echo "Pushing $SRC_IMAGE to $DST_IMAGE"
docker pull $SRC_IMAGE
docker tag $SRC_IMAGE $DST_IMAGE
docker push $DST_IMAGE
- name: Cross-push api
run: |
SRC_IMAGE=${{ env.SRC_REPOSITORY }}/api:${{ env.SRC_TAG }}
DST_IMAGE=${{ env.DST_REPOSITORY }}/api:${{ env.DST_TAG }}

echo "Pushing $SRC_IMAGE to $DST_IMAGE"
docker pull $SRC_IMAGE
docker tag $SRC_IMAGE $DST_IMAGE
Expand Down Expand Up @@ -341,7 +280,7 @@ jobs:
github-release:
if: github.event_name == 'release'
name: 🐙 Update GitHub Release
needs: [build-core, build-api]
needs: [build-core]
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -352,11 +291,6 @@ jobs:
name: core-executable
path: .artifacts/core-executable

- uses: actions/download-artifact@v2
with:
name: api-executable
path: .artifacts/api-executable

- name: Build release asset upload url
run: |
RELEASE_ID=$(jq --raw-output '.release.id' $GITHUB_EVENT_PATH)
Expand All @@ -378,13 +312,3 @@ jobs:
asset_path: .artifacts/core-executable/webgrid
asset_name: webgrid-core-linux
asset_content_type: application/octet-stream

- name: Attach API executable
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.RELEASE_ASSET_UPLOAD_URL }}?name=webgrid-api.js
asset_path: .artifacts/api-executable/index.js
asset_name: webgrid-api.js
asset_content_type: application/javascript
13 changes: 0 additions & 13 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,6 @@ jobs:
- name: Run tests
run: cargo test --verbose

api:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-node@v2-beta
with:
node-version: "14"

- run: make api

docs:
runs-on: ubuntu-latest
needs: core
Expand Down
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,12 @@ builder:
docker build --platform linux/arm64 --build-arg TAG=arm64 -f distribution/docker/images/builder/Dockerfile -t webgrid/rust-musl-builder:arm64-root .
docker build --platform linux/amd64 --build-arg TAG=amd64 -f distribution/docker/images/builder/Dockerfile -t webgrid/rust-musl-builder:amd64-root .

api:
cd api && yarn install && yarn build
mkdir -p .artifacts/api-executable
mv api/dist/index.js .artifacts/api-executable

core:
cd core && ./build.sh --release

core-debug:
cd core && ./build.sh

bundle-api: api
docker build --platform linux/amd64 -f distribution/docker/images/api/Dockerfile -t webgrid/api:latest .

bundle-core: core
docker build --platform linux/amd64 -f distribution/docker/images/core/Dockerfile -t webgrid/core:latest .

Expand Down
41 changes: 0 additions & 41 deletions api/.eslintrc.js

This file was deleted.

8 changes: 0 additions & 8 deletions api/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions api/build.js

This file was deleted.

36 changes: 0 additions & 36 deletions api/package.json

This file was deleted.

97 changes: 0 additions & 97 deletions api/resources/embed.js

This file was deleted.

Loading