fix: adjust user update logic in api #139
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install | |
run: yarn | |
- name: Test | |
env: | |
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }} | |
run: | | |
cp .env.dist .env | |
npm run test:ci | |
cd: | |
needs: ci | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Semantic Release | |
run: npx semantic-release | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
- name: Get tag version | |
run: echo VERSION=$(git describe --abbrev=0 --tags) >> $GITHUB_ENV | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Login to registry | |
uses: docker/login-action@v1 | |
with: | |
registry: registry.ethibox.fr | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Deploy | |
run: | | |
cp .env.dist .env | |
docker build -t ethibox/ethibox:${{ env.VERSION }} -t ethibox/ethibox:latest . | |
docker build \ | |
--build-arg NEXT_PUBLIC_BASE_PATH=/app \ | |
--build-arg SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} \ | |
--build-arg NEXT_PUBLIC_SENTRY_DSN=${{ secrets.NEXT_PUBLIC_SENTRY_DSN }} \ | |
-t registry.ethibox.fr/ethibox:${{ env.VERSION }} \ | |
-t registry.ethibox.fr/ethibox:latest . | |
docker push ethibox/ethibox:latest | |
docker push ethibox/ethibox:${{ env.VERSION }} | |
docker push registry.ethibox.fr/ethibox:latest | |
docker push registry.ethibox.fr/ethibox:${{ env.VERSION }} | |
curl -X POST https://portainer.ethibox.fr/api/stacks/webhooks/23863b0b-7690-4015-b34d-5a81132ed6ef |