Skip to content

Commit 514a1f3

Browse files
GHA: Argo deployment workflow dev (#692)
* new argo deployment workflow * update pin * fix branch * add cd argo after docker tag and build * remove deploy yaml * update tag name and condition * comment out condition for testing * fix dockertag and uri * add conditional statement * change to argo ops instance
1 parent 865a6d6 commit 514a1f3

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/docker.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
subject: ${{ steps.image_tag.outputs.subject }}
2323
tag: ${{ steps.image_tag.outputs.tag }}
2424
registry: ${{ steps.image_tag.outputs.registry }}
25+
ref_name: ${{ steps.image_tag.outputs.ref_name }}
2526
steps:
2627
- name: Use ghcr.io
2728
if: github.event_name != 'push' || github.ref_type != 'tag'
@@ -59,6 +60,7 @@ jobs:
5960
echo "registry=$REGISTRY" >> "$GITHUB_OUTPUT"
6061
echo "subject=$REGISTRY/$REPOSITORY" >> "$GITHUB_OUTPUT"
6162
echo "tag=$REGISTRY/$REPOSITORY:$REF_NAME" >> "$GITHUB_OUTPUT"
63+
echo "ref_name=$REF_NAME" >> "$GITHUB_OUTPUT"
6264
6365
build:
6466
strategy:
@@ -173,3 +175,25 @@ jobs:
173175
> [!WARNING]
174176
> This is a development image and should not be used in production.
175177
> It will be automatically removed after 2 weeks.
178+
179+
cd-auto-deploy-dev:
180+
name: Deploy to dev
181+
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
182+
needs: [tag, build]
183+
runs-on: ubuntu-latest
184+
permissions:
185+
contents: read
186+
id-token: write
187+
steps:
188+
- id: "trigger-argowfs-deployment"
189+
name: "Trigger Argo Workflow"
190+
uses: grafana/shared-workflows/actions/trigger-argo-workflow@5d7e361bc7e0a183cde8afe9899fb7b596d2659b
191+
with:
192+
instance: "ops"
193+
namespace: "render-service-cd"
194+
workflow_template: "auto-deploy-dev"
195+
parameters: |
196+
dockertag=${{ needs.tag.outputs.ref_name }}
197+
- name: Print URI
198+
run: |
199+
echo "URI: ${{ steps.trigger-argowfs-deployment.outputs.uri }}"

0 commit comments

Comments
 (0)