Skip to content

build(deps): bump base-x from 3.0.9 to 3.0.11 #459

build(deps): bump base-x from 3.0.9 to 3.0.11

build(deps): bump base-x from 3.0.9 to 3.0.11 #459

Workflow file for this run

name: Build And Tests
on:
push:
pull_request:
branches:
- "main"
- "dev"
jobs:
test:
runs-on: macos-latest
env:
MONGOMS_VERSION: 6.0.5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: 'yarn'
- run: yarn install
- uses: google/wireit@setup-github-actions-caching/v1
- run: MONGOMS_VERSION=6.0.5 yarn test --coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: 'yarn'
- run: yarn install
- uses: google/wireit@setup-github-actions-caching/v1
- run: yarn build
env:
NEXT_PUBLIC_APP_ID: ${{ secrets.APP_ID }}
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Prepare
id: prep
run: |
DOCKER_IMAGE=sirily11/etd-remote-admin-server
VERSION=edge
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
elif [[ $GITHUB_REF == refs/heads/* ]]; then
VERSION=latest
elif [[ $GITHUB_REF == refs/pull/* ]]; then
VERSION=pr-${{ github.event.number }}
fi
TAGS="${DOCKER_IMAGE}:${VERSION}"
echo ::set-output name=version::${VERSION}
echo ::set-output name=tags::${TAGS}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: google/wireit@setup-github-actions-caching/v1
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prep.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
APP_ID=${{ secrets.APP_ID }}
PUBLIC_STATS_SERVER=${{secrets.PUBLIC_STATS_SERVER}}
NEXT_PUBLIC_SECRET=${{secrets.NEXT_PUBLIC_SECRET}}
VERSION=${{ steps.prep.outputs.tags }}
pre-release:
runs-on: ubuntu-latest
if: ${{ (github.event.head_commit.author.name != 'github action') && (github.ref == 'refs/heads/dev') }}
needs: [ docker, build ]
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: 'yarn'
- run: yarn install
name: Installing dependencies
- name: Setup git identity
run: |
git config --global user.email "github-action.github.com"
git config --global user.name "github action"
- name: Pre-release
run: yarn release --ci --preRelease=beta
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Deploy to GitHub Page
uses: JamesIves/[email protected]
with:
branch: k8s-release-dev
folder: example_configs/k8s
release:
runs-on: ubuntu-latest
if: ${{ (github.event.head_commit.author.name != 'github action') && (github.ref == 'refs/heads/main') }}
needs: [ docker, build ]
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: 'yarn'
- run: yarn install
name: Installing dependencies
- name: Setup git identity
run: |
git config --global user.email "github-action.github.com"
git config --global user.name "github action"
- name: Pre-release
run: yarn release --ci
env:
GITHUB_TOKEN: ${{secrets.RELEASE_TOKEN}}
- name: Deploy to GitHub Page
uses: JamesIves/[email protected]
with:
branch: k8s-release
folder: example_configs/k8s