forked from opencost/opencost
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.12 KB
/
promote-to-demo.yaml
File metadata and controls
42 lines (37 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Promote to Demo
on:
workflow_run:
workflows: [Build and Publish Develop]
types: [completed]
branches: [develop]
concurrency:
group: build-opencost-develop
cancel-in-progress: false
permissions: {}
jobs:
prep-image-name:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
outputs:
image_tag: ${{ steps.tags.outputs.IMAGE_TAG }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Set SHA
id: sha
run: |
echo "OC_SHORTHASH=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Set OpenCost Image Tags
id: tags
env:
REPO_OWNER: ${{ github.repository_owner }}
OC_SHORTHASH: ${{ steps.sha.outputs.OC_SHORTHASH }}
run: |
echo "IMAGE_TAG=ghcr.io/$REPO_OWNER/opencost:develop-$OC_SHORTHASH" >> $GITHUB_OUTPUT
install-on-demo:
needs: [prep-image-name]
uses: opencost/opencost-infra/.github/workflows/promote-to-oc-demo.yaml@main
secrets: inherit
with:
img-fqdn: ${{ needs.prep-image-name.outputs.image_tag }}
is_be: true