mirror of
https://github.com/yanislav-igonin/micrach
synced 2024-12-22 22:32:33 +03:00
88 lines
2.4 KiB
YAML
88 lines
2.4 KiB
YAML
|
# name: Release
|
||
|
|
||
|
# on:
|
||
|
# release:
|
||
|
# types: [released]
|
||
|
|
||
|
# jobs:
|
||
|
# lint:
|
||
|
# runs-on: ubuntu-latest
|
||
|
|
||
|
# steps:
|
||
|
# - name: Checkout
|
||
|
# uses: actions/checkout@v2
|
||
|
# - name: Use Node.js 14
|
||
|
# uses: actions/setup-node@v2-beta
|
||
|
# with:
|
||
|
# node-version: 14.x
|
||
|
# - name: Install dependencies
|
||
|
# run: npm ci
|
||
|
# - name: Lint
|
||
|
# run: npm run lint
|
||
|
|
||
|
# build:
|
||
|
# needs: lint
|
||
|
|
||
|
# runs-on: ubuntu-latest
|
||
|
|
||
|
# steps:
|
||
|
# - name: Checkout
|
||
|
# uses: actions/checkout@v2
|
||
|
# - name: Use Node.js 14
|
||
|
# uses: actions/setup-node@v2-beta
|
||
|
# with:
|
||
|
# node-version: 14.x
|
||
|
# - name: Install dependencies
|
||
|
# run: npm ci
|
||
|
# - name: Build
|
||
|
# run: npm run build
|
||
|
# - name: Upload build
|
||
|
# uses: actions/upload-artifact@v2
|
||
|
# with:
|
||
|
# name: dist
|
||
|
# path: dist
|
||
|
|
||
|
# release:
|
||
|
# needs: build
|
||
|
|
||
|
# runs-on: ubuntu-latest
|
||
|
|
||
|
# steps:
|
||
|
# - name: Checkout
|
||
|
# uses: actions/checkout@v2
|
||
|
# - name: Download build
|
||
|
# uses: actions/download-artifact@v2
|
||
|
# with:
|
||
|
# name: dist
|
||
|
# path: dist
|
||
|
# - name: Build docker image and push to GitHub registry
|
||
|
# uses: docker/build-push-action@v1
|
||
|
# with:
|
||
|
# username: ${{ github.actor }}
|
||
|
# password: ${{ secrets.GITHUB_TOKEN }}
|
||
|
# registry: docker.pkg.github.com
|
||
|
# repository: yanislav-igonin/face-fucker-bot/face-fucker-bot
|
||
|
# dockerfile: production.Dockerfile
|
||
|
# tags: latest, ${{ github.event.release.tag_name }}
|
||
|
# build_args: CI_COMMIT_TAG=${{ github.event.release.tag_name }}
|
||
|
|
||
|
# deploy:
|
||
|
# needs: release
|
||
|
|
||
|
# runs-on: ubuntu-latest
|
||
|
|
||
|
# steps:
|
||
|
# - name: Deploy
|
||
|
# uses: appleboy/ssh-action@master
|
||
|
# env:
|
||
|
# REGISTRY: docker.pkg.github.com/yanislav-igonin/face-fucker-bot
|
||
|
# SERVICE_NAME: face-fucker-bot_app
|
||
|
# with:
|
||
|
# host: ${{ secrets.VPS_HOST }}
|
||
|
# username: ${{ secrets.VPS_SSH_USERNAME }}
|
||
|
# key: ${{ secrets.VPS_SSH_PRIVATE_KEY }}
|
||
|
# script: |
|
||
|
# docker login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ${{ env.REGISTRY }}
|
||
|
# docker pull ${{ env.REGISTRY }}:${{ github.event.release.tag_name }}
|
||
|
# docker pull ${{ env.REGISTRY }}:latest
|
||
|
# docker service update --image ${{ env.REGISTRY }}:${{ github.event.release.tag_name }} ${{ env.SERVICE_NAME }}
|