From 284f91b851e678b59d9506546dba1f6886ea990b Mon Sep 17 00:00:00 2001 From: Stepan Vladovskii Date: Wed, 24 Jan 2024 19:04:36 -0300 Subject: [PATCH 1/7] feat: change workflow for use branch feature/core in app core --- .gitea/workflows/main.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index 8d2053f1..6b899284 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -11,10 +11,6 @@ jobs: with: fetch-depth: 0 - - name: Get Repo Name - id: repo_name - run: echo "::set-output name=repo::$(echo ${GITHUB_REPOSITORY##*/})" - - name: Get Branch Name id: branch_name run: echo "::set-output name=branch::$(echo ${GITHUB_REF##*/})" @@ -22,7 +18,8 @@ jobs: - name: Push to dokku uses: dokku/github-action@master with: - branch: 'main' - git_remote_url: 'ssh://dokku@staging.discours.io:22/${{ steps.repo_name.outputs.repo }}' - ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} - git_push_flags: '--force' \ No newline at end of file + ssh-private-key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }} + ssh-host: staging.discours.io + ssh-user: dokku + app-name: ${{ steps.branch_name.outputs.branch == 'main' ? 'discoursio-api' : 'core' }} + git-remote-url: ${{ steps.branch_name.outputs.branch == 'main' ? 'ssh://dokku@staging.discours.io:22/discoursio-api' : 'ssh://dokku@staging.discours.io:22/core' }} \ No newline at end of file From 3332088b21a3bcd591f66542d29f89d52205e54c Mon Sep 17 00:00:00 2001 From: Stepan Vladovskii Date: Wed, 24 Jan 2024 19:14:41 -0300 Subject: [PATCH 2/7] debug: actions without yml strange contex --- .gitea/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index 6b899284..c867022f 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -21,5 +21,5 @@ jobs: ssh-private-key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }} ssh-host: staging.discours.io ssh-user: dokku - app-name: ${{ steps.branch_name.outputs.branch == 'main' ? 'discoursio-api' : 'core' }} - git-remote-url: ${{ steps.branch_name.outputs.branch == 'main' ? 'ssh://dokku@staging.discours.io:22/discoursio-api' : 'ssh://dokku@staging.discours.io:22/core' }} \ No newline at end of file + app-name: ${{ (steps.branch_name.outputs.branch == 'main') ? 'discoursio-api' : 'core' }} + git-remote-url: ${{ (steps.branch_name.outputs.branch == 'main') ? 'ssh://dokku@staging.discours.io:22/discoursio-api' : 'ssh://dokku@staging.discours.io:22/core' }} \ No newline at end of file From 1883f0d733890b50d6eaabe0c00f4b5762e93d6f Mon Sep 17 00:00:00 2001 From: Stepan Vladovskii Date: Wed, 24 Jan 2024 20:39:26 -0300 Subject: [PATCH 3/7] debug: simplify main.yml for actions --- .gitea/workflows/main.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index c867022f..09e5d035 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -1,6 +1,8 @@ -name: 'deploy' +name: 'Deploy to core' on: push: + branches: + - feature/core jobs: deploy: @@ -11,15 +13,11 @@ jobs: with: fetch-depth: 0 - - name: Get Branch Name - id: branch_name - run: echo "::set-output name=branch::$(echo ${GITHUB_REF##*/})" - - - name: Push to dokku + - name: Push to core uses: dokku/github-action@master with: ssh-private-key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }} ssh-host: staging.discours.io ssh-user: dokku - app-name: ${{ (steps.branch_name.outputs.branch == 'main') ? 'discoursio-api' : 'core' }} - git-remote-url: ${{ (steps.branch_name.outputs.branch == 'main') ? 'ssh://dokku@staging.discours.io:22/discoursio-api' : 'ssh://dokku@staging.discours.io:22/core' }} \ No newline at end of file + app-name: core + git-remote-url: ssh://dokku@staging.discours.io:22/core From 2d73a5b8742b3bf5a753f93d4d34b28d869fabda Mon Sep 17 00:00:00 2001 From: Stepan Vladovskii Date: Wed, 24 Jan 2024 20:42:51 -0300 Subject: [PATCH 4/7] debug: simplify main.yml for actions --- .gitea/workflows/main.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index 09e5d035..f61a8741 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -21,3 +21,35 @@ jobs: ssh-user: dokku app-name: core git-remote-url: ssh://dokku@staging.discours.io:22/core + +name: 'Deploy to core' +on: + push: + branches: + - feature/core + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Cloning repo + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Get Repo Name + id: repo_name + run: echo "::set-output name=repo::$(echo ${GITHUB_REPOSITORY##*/})" + + - name: Get Branch Name + id: branch_name + run: echo "::set-output name=branch::$(echo ${GITHUB_REF##*/})" + + - name: Push to dokku + uses: dokku/github-action@master + with: + branch: 'main' + git_remote_url: 'ssh://dokku@staging.discours.io:22/core' + ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} + git_push_flags: '--force' + From e8d85d99145cdd1e7c23cb004b24dfc5b60d2401 Mon Sep 17 00:00:00 2001 From: Stepan Vladovskii Date: Wed, 24 Jan 2024 20:43:10 -0300 Subject: [PATCH 5/7] debug: simplify main.yml for actions --- .gitea/workflows/main.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index f61a8741..2eae227a 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -4,30 +4,6 @@ on: branches: - feature/core -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - name: Cloning repo - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Push to core - uses: dokku/github-action@master - with: - ssh-private-key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }} - ssh-host: staging.discours.io - ssh-user: dokku - app-name: core - git-remote-url: ssh://dokku@staging.discours.io:22/core - -name: 'Deploy to core' -on: - push: - branches: - - feature/core - jobs: deploy: runs-on: ubuntu-latest From ebbbcc97f224a2c5ca74da5f38a6d7fb595327f4 Mon Sep 17 00:00:00 2001 From: Stepan Vladovskii Date: Wed, 24 Jan 2024 21:07:05 -0300 Subject: [PATCH 6/7] feat: yess, it was deploy on staging --- .gitea/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index 2eae227a..914e64a1 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -25,7 +25,7 @@ jobs: uses: dokku/github-action@master with: branch: 'main' - git_remote_url: 'ssh://dokku@staging.discours.io:22/core' + git_remote_url: 'ssh://dokku@v2.discours.io:22/core' ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} git_push_flags: '--force' From 1db943acc01cb134834e6b23abc1a33552db1e8d Mon Sep 17 00:00:00 2001 From: Stepan Vladovskii Date: Wed, 24 Jan 2024 22:47:36 -0300 Subject: [PATCH 7/7] debug: deploy in branch main of core dokku app --- .gitea/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index 914e64a1..6109fd26 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -2,7 +2,7 @@ name: 'Deploy to core' on: push: branches: - - feature/core + - main jobs: deploy: