Skip to content

Excludes classes 218 and 503 for the Container tab #160

Excludes classes 218 and 503 for the Container tab

Excludes classes 218 and 503 for the Container tab #160

Workflow file for this run

name: Dockerize
on:
pull_request:
branches:
- main
jobs:
set-version:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
outputs:
version_tag: ${{steps.npm_version.outputs.tag}}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Extract number of pull request
id: pull_request
run: |
echo ::set-output name=number::$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
- name: Prints number of pull request
run: echo Pull request branch is '${{ steps.pull_request.outputs.number }}'
- name: Send Discord Notification
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_GITHUB_CHANNEL_WEBHOOK }}
title: "Dockerize Toolbox Server and Client"
description: "PR: ${{ steps.pull_request.outputs.number }}"
color: 0xffed2b
username: GitHub Actions
- name: Git Identity
run: |
git config --global user.name 'geovbot'
git config --global user.email '[email protected]'
git remote set-url origin https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v2
with:
node-version: "16.13.2"
registry-url: "https://registry.npmjs.org"
- name: Tag this commit with pr
id: npm_version
run: |
npm version prerelease --preid pr-${{steps.pull_request.outputs.number}} --no-git-tag-version
echo ::set-output name=tag::$(cat ./package.json | jq -r '.version')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Echo tag created by npm
run: echo your tag is '${{steps.npm_version.outputs.tag}}'
- name: Update Lock file
run: "npm i --package-lock-only"
- uses: EndBug/add-and-commit@v5
with:
message: "chore(): update prerelease version"
tag: v${{steps.npm_version.outputs.tag}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
dockerize-webserver:
runs-on: ubuntu-latest
needs: [set-version]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Build & Push
uses: docker/build-push-action@v3
with:
# Location of Dockerfile, if not Dockerfile in root directory
file: server/webserver.dockerfile
# Directory to run `docker build` from, if not project root
context: server
push: true
tags: ghcr.io/geovistory/toolbox-server:${{needs.set-version.outputs.version_tag}}
- name: Send Discord Notification
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_GITHUB_CHANNEL_WEBHOOK }}
title: "Dockerize Toolbox Server > Done"
description: "Image Tag: ${{needs.set-version.outputs.version_tag}}"
color: 0x0000ff
username: GitHub Actions
dockerize-client:
runs-on: ubuntu-latest
needs: [set-version]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-node@v2
with:
node-version: "16.13.2"
registry-url: "https://registry.npmjs.org"
- name: Setup version info
id: setup_version
run: "npm --prefix client run setup:version"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Build & Push
uses: docker/build-push-action@v3
with:
# Location of Dockerfile, if not Dockerfile in root directory
file: client/Dockerfile
# Directory to run `docker build` from, if not project root
context: client
push: true
tags: ghcr.io/geovistory/toolbox-client:${{needs.set-version.outputs.version_tag}}
- name: Send Discord Notification
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_GITHUB_CHANNEL_WEBHOOK }}
title: "Dockerize Toolbox Client > Done"
description: "Image Tag: ${{needs.set-version.outputs.version_tag}}"
color: 0x0000ff
username: GitHub Actions