Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Merge pull request #422 from beabee-communityrm/feat/delete-contact #803

Merge pull request #422 from beabee-communityrm/feat/delete-contact

Merge pull request #422 from beabee-communityrm/feat/delete-contact #803

Workflow file for this run

name: Deploy
on:
push:
branches: ["master", "dev"]
jobs:
init:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.setvars.outputs.tag }}
stack: ${{ steps.setvars.outputs.stack }}
steps:
- id: setvars
run: |
case "${{ github.ref }}" in
refs/heads/master)
echo "tag=latest" >> $GITHUB_OUTPUT
echo "stack=beabee-demo" >> $GITHUB_OUTPUT
;;
refs/heads/dev)
echo "tag=dev" >> $GITHUB_OUTPUT
echo "stack=beabee-dev" >> $GITHUB_OUTPUT
;;
esac
check:
uses: ./.github/workflows/check.yml
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- run: cp .env.example .env
- run: npm test
push:
runs-on: ubuntu-latest
needs: [init, check, test]
steps:
- uses: actions/checkout@v3
- id: getrev
run: |
echo "revision=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/build-push-action@v3
with:
push: true
target: app
build-args: |
REVISION=${{ steps.getrev.outputs.revision }}
tags: ${{ secrets.DOCKER_ORGANISATION }}/beabee:${{ needs.init.outputs.tag }}
- uses: docker/build-push-action@v3
with:
push: true
target: router
tags: ${{ secrets.DOCKER_ORGANISATION }}/router:${{ needs.init.outputs.tag }}
deploy:
runs-on: ubuntu-latest
needs: [init, push]
steps:
- uses: jonasschatz/portami@main
with:
endpoint: "https://port.hive.beabee.io"
access_token: ${{ secrets.PORTAINER_ACCESSTOKEN }}
stack_name: ${{ needs.init.outputs.stack }}
prune: true
pull: true