From 8f4ad4adaf721320810743a132c987131603c80e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Urban?= Date: Fri, 27 Dec 2024 12:30:20 +0100 Subject: [PATCH 1/3] fix: create auto deployment on dev --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d115cd6..65c5be2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,7 +8,7 @@ env: jobs: pulumi-deploy-dev: - environment: dev + environment: development runs-on: ubuntu-latest steps: - name: Checkout code From 15debbefd4b84ff5cd88a91f0843c90eadc04f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Urban?= Date: Fri, 27 Dec 2024 12:34:48 +0100 Subject: [PATCH 2/3] fix: create auto deployment on dev --- .github/workflows/push.yml | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 42ce93f..ffff3aa 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -7,13 +7,14 @@ on: - "renovate/*" jobs: preview: - name: Preview + name: Preview-Prod + environment: development runs-on: ubuntu-latest strategy: fail-fast: false matrix: workdir: [ l1, l2 ] - stack: [hetzner] + stack: [openstack] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4.1.0 @@ -34,3 +35,32 @@ jobs: stack-name: ${{ matrix.stack }} env: PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + preview-prod: + name: Preview-Prod + runs-on: ubuntu-latest + environment: prod + strategy: + fail-fast: false + matrix: + workdir: [ l1, l2 ] + stack: [hetzner] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4.1.0 + with: + node-version: '19.9.0' + - name: Decode kubeconfig + run: | + mkdir -p $HOME/.kube + echo "${{ secrets.KUBE_CONFIG }}" | base64 -d > $HOME/.kube/config + cat $HOME/.kube/config + shell: bash + - run: npm install + working-directory: ${{ matrix.workdir }} + - uses: pulumi/actions@v6 + with: + command: preview + work-dir: ${{ matrix.workdir }} + stack-name: ${{ matrix.stack }} + env: + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} From 6e9e0fcce34ee2221a00772c8fda3a71f9f47c51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Urban?= Date: Fri, 27 Dec 2024 12:38:41 +0100 Subject: [PATCH 3/3] fix: create auto deployment on dev --- .github/workflows/push.yml | 31 +--------------- .github/workflows/push_master.yml | 62 +++++++++++++++++++++++++++++++ .github/workflows/release.yml | 32 ---------------- 3 files changed, 63 insertions(+), 62 deletions(-) create mode 100644 .github/workflows/push_master.yml delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index ffff3aa..9e61df4 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -7,7 +7,7 @@ on: - "renovate/*" jobs: preview: - name: Preview-Prod + name: Preview-dev environment: development runs-on: ubuntu-latest strategy: @@ -35,32 +35,3 @@ jobs: stack-name: ${{ matrix.stack }} env: PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} - preview-prod: - name: Preview-Prod - runs-on: ubuntu-latest - environment: prod - strategy: - fail-fast: false - matrix: - workdir: [ l1, l2 ] - stack: [hetzner] - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4.1.0 - with: - node-version: '19.9.0' - - name: Decode kubeconfig - run: | - mkdir -p $HOME/.kube - echo "${{ secrets.KUBE_CONFIG }}" | base64 -d > $HOME/.kube/config - cat $HOME/.kube/config - shell: bash - - run: npm install - working-directory: ${{ matrix.workdir }} - - uses: pulumi/actions@v6 - with: - command: preview - work-dir: ${{ matrix.workdir }} - stack-name: ${{ matrix.stack }} - env: - PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} diff --git a/.github/workflows/push_master.yml b/.github/workflows/push_master.yml new file mode 100644 index 0000000..e48961d --- /dev/null +++ b/.github/workflows/push_master.yml @@ -0,0 +1,62 @@ +name: Release + +on: + workflow_run: + workflows: [Pulumi] + types: + - completed + branches: + - master +jobs: + preview-prod: + name: Preview-Prod + runs-on: ubuntu-latest + environment: prod + strategy: + fail-fast: false + matrix: + workdir: [ l1, l2 ] + stack: [ hetzner ] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4.1.0 + with: + node-version: '19.9.0' + - name: Decode kubeconfig + run: | + mkdir -p $HOME/.kube + echo "${{ secrets.KUBE_CONFIG }}" | base64 -d > $HOME/.kube/config + cat $HOME/.kube/config + shell: bash + - run: npm install + working-directory: ${{ matrix.workdir }} + - uses: pulumi/actions@v6 + with: + command: preview + work-dir: ${{ matrix.workdir }} + stack-name: ${{ matrix.stack }} + env: + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + release: + needs: preview-prod + runs-on: ubuntu-latest + permissions: + contents: write + issues: write + pull-requests: write + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Install dependencies + run: npm install -g semantic-release @saithodev/semantic-release-backmerge @semantic-release/github @semantic-release/exec + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + run: npx semantic-release --debug \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 997f549..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Release - -on: - workflow_run: - workflows: [Pulumi] - types: - - completed - branches: - - master -jobs: - release: - runs-on: ubuntu-latest - permissions: - contents: write - issues: write - pull-requests: write - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - persist-credentials: false - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - - name: Install dependencies - run: npm install -g semantic-release @saithodev/semantic-release-backmerge @semantic-release/github @semantic-release/exec - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.PAT }} - run: npx semantic-release --debug \ No newline at end of file