Skip to content

Commit

Permalink
fix: create auto deployment on dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Urban committed Dec 27, 2024
1 parent 15debbe commit 6e9e0fc
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 62 deletions.
31 changes: 1 addition & 30 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- "renovate/*"
jobs:
preview:
name: Preview-Prod
name: Preview-dev
environment: development
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -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/[email protected]
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 }}
62 changes: 62 additions & 0 deletions .github/workflows/push_master.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
32 changes: 0 additions & 32 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit 6e9e0fc

Please sign in to comment.