Skip to content

chore(deps): upgrade regenerator-runtime to v0.14.1 (#1021) #330

chore(deps): upgrade regenerator-runtime to v0.14.1 (#1021)

chore(deps): upgrade regenerator-runtime to v0.14.1 (#1021) #330

Workflow file for this run

name: Deploy
on:
push:
branches: ['main', 'dev', 'feature/**']
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# SETUP
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/login-action@v2
with:
username: mauricenino
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: '20.x'
cache: 'yarn'
- if: ${{ github.ref_name == 'main' }}
run: yarn --immutable --immutable-cache
- if: ${{ github.ref_name == 'main' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "package_version=$(yarn semantic-release -d | sed -n 's/.*next release version is \([0-9]\+\.[0-9]\+\.[0-9]\+\)/\1/p')" >> "$GITHUB_ENV"
- if: ${{ github.ref_name == 'main' }}
run: |
[ ! -z "${package_version}" ] || exit 1
# DEPLOY
# fix oom issues (https://github.com/orgs/community/discussions/26351)
- run: |
df -h
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
df -h
- uses: docker/metadata-action@v4
id: meta
with:
images: |
ghcr.io/mauricenino/dashdot
mauricenino/dashdot
labels: |
org.opencontainers.image.title="dash."
org.opencontainers.image.description="dash. - a modern server dashboard"
org.opencontainers.image.authors="MauriceNino <[email protected]>"
org.opencontainers.image.url=https://github.com/MauriceNino/dashdot
org.opencontainers.image.source=https://github.com/MauriceNino/dashdot
org.opencontainers.image.licenses=MIT
tags: |
type=semver,pattern={{version}},value=${{ format('v{0}', env.package_version) }},enable=${{ github.ref_name == 'main' }}
type=semver,pattern={{major}}.{{minor}},value=${{ format('v{0}', env.package_version) }},enable=${{ github.ref_name == 'main' }}
type=semver,pattern={{major}},value=${{ format('v{0}', env.package_version) }},enable=${{ github.ref_name == 'main' }}
type=ref,event=branch,enable=${{ github.ref_name != 'main' }}
- uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64/v8
target: prod
push: true
build-args: |
VERSION=${{ github.ref_name == 'main' && env.package_version || format('0.0.0-{0}', github.ref_name) }}
BUILDHASH=${{ github.sha }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
- if: ${{ github.ref_name == 'main' }}
env:
GIT_USER: github-actions
GIT_AUTHOR_NAME: github-actions
GIT_COMMITTER_NAME: github-actions
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_PASS: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
yarn semantic-release
yarn nx build docs
yarn nx deploy docs
- if: ${{ github.ref_name == 'main' }}
run: curl --get --data-urlencode "service=dashdot" --data-urlencode "image=mauricenino/dashdot:latest" --data-urlencode "secret=${{ secrets.REX_TOKEN }}" https://rex.mauz.dev/deploy
- if: ${{ github.ref_name == 'dev' }}
run: curl --get --data-urlencode "service=dashdot" --data-urlencode "image=mauricenino/dashdot:dev" --data-urlencode "secret=${{ secrets.REX_TOKEN }}" https://rex.mauz.dev/deploy