Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Edit newTag variable manually #6

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/newTag-kustomization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
workflow_dispatch:
inputs:
image_tag:
description: 'Release tag'
required: true
default: 'test'
environment:
description: 'Select the environment to change'
required: true
default: 'dev'

jobs:

apply_release_on_kustomize:
runs-on: ubuntu-latest
steps:

- name: Checkout cads-deployment repo
uses: actions/checkout@v3
with:
repository: ecmwf-projects/cads-deployment
ref: build-images-test
token: ${{ secrets.CADS_PAT }}
path: .

- name: Update test/kustomization.yaml file
run: |
sed -i "s/newTag:.*/newTag: '${{ github.event.inputs.image_tag }}'/g" ./kustomize/overlays/${{ github.event.inputs.environment }}/kustomization.yaml

- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Tagged test images to ${{ github.event.inputs.image_tag }}"
branch: build-images-test