mirror of
https://github.com/getAlby/lndhub.go.git
synced 2026-02-23 13:54:25 +01:00
Merge pull request #77 from getAlby/feature/continuous-deployment
add CD steps to build workflow
This commit is contained in:
38
.github/workflows/workflow.yaml
vendored
38
.github/workflows/workflow.yaml
vendored
@@ -3,8 +3,8 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- '*'
|
||||
release:
|
||||
types: [published]
|
||||
jobs:
|
||||
build:
|
||||
env:
|
||||
@@ -16,8 +16,42 @@ jobs:
|
||||
name: Check out code
|
||||
- name: Docker build
|
||||
uses: mr-smithers-excellent/docker-build-push@v5
|
||||
id: build
|
||||
with:
|
||||
image: ${{ env.IMAGENAME }}
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Checkout deployment repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: getalby/alby-deployment
|
||||
path: infrastructure
|
||||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
||||
# Always update dev environment
|
||||
- name: Update dev environment
|
||||
uses: fjogeleit/yaml-update-action@v0.7.0
|
||||
with:
|
||||
valueFile: alby-simnet-deployment/values.yaml'
|
||||
propertyPath: 'lndhub.image.tag'
|
||||
value: ${{ steps.build.outputs.tags }}
|
||||
repository: getalby/alby-deployment
|
||||
branch: main
|
||||
createPR: false
|
||||
message: 'CD: Update lndhub tag to ${{ steps.build.outputs.tags }}'
|
||||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
||||
workDir: infrastructure
|
||||
# Only update prod environment if this action was triggered by a new tag
|
||||
- name: Update production environment
|
||||
if: startsWith(github.ref, 'refs/tags')
|
||||
uses: fjogeleit/yaml-update-action@v0.7.0
|
||||
with:
|
||||
valueFile: alby-mainnet-deployment/values.yaml'
|
||||
propertyPath: 'lndhub.image.tag'
|
||||
value: ${{ steps.build.outputs.tags }}
|
||||
repository: getalby/alby-deployment
|
||||
branch: main
|
||||
createPR: false
|
||||
message: 'CD: Update lndhub tag to ${{ steps.build.outputs.tag }}'
|
||||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
||||
workDir: infrastructure
|
||||
Reference in New Issue
Block a user