bump-stacpipeline-version #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bump geo-undpstac-pipeline version | |
on: | |
# This workflow will be triggered when the new release tag is created on geohub-data-pipeline repository.concurrency: | |
# https://github.com/UNDP-Data/geohub-data-pipeline/blob/main/.github/workflows/acr_docker_image.yml | |
repository_dispatch: | |
types: [bump-stacpipeline-version] | |
workflow_dispatch: | |
jobs: | |
bump-version: | |
runs-on: ubuntu-latest | |
env: | |
OWNER: undp-data | |
REPO: geo-undpstac-pipeline | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: develop | |
- name: get the latest version | |
id: pipeline | |
uses: pozetroninc/github-action-get-latest-release@master | |
with: | |
owner: ${{ env.OWNER }} | |
repo: ${{ env.REPO }} | |
excludes: prerelease, draft | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: bump geo-undpstac-pipeline version | |
working-directory: backends/k8s/stac-pipeline/yaml | |
env: | |
PIPELINE_VERSION: ${{ steps.pipeline.outputs.release }} | |
YAML: deployment.yaml | |
run: | | |
echo "Latest release version: ${{ env.PIPELINE_VERSION}}" | |
imagename="undpgeohub.azurecr.io/${{env.OWNER}}/${{ env.REPO }}" | |
pattern="${imagename}:[^ ]*" | |
sed "s|$pattern|$imagename:${{ env.PIPELINE_VERSION}}|g" ${{ env.YAML}} > temp.yaml | |
# replace yaml file with new version | |
mv temp.yaml ${{ env.YAML}} | |
echo "tag version was replace to ${{ env.PIPELINE_VERSION}}" | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
branch: release/bump-geo-undpstac-pipeline | |
title: "[RELEASE] bump version of geo-undpstac-pipeline" | |
delete-branch: true | |
commit-message: "[RELEASE] bump version of geo-undpstac-pipeline" | |
body: | | |
## Description | |
This is going to bump the version ofgeo-undpstac-pipeline to apply the new pipeline docker image to kubernetes cluster | |
--- | |
- Auto-generated by [create-pull-request][1] | |
[1]: https://github.com/peter-evans/create-pull-request | |
labels: release | |
reviewers: | | |
iferencik | |
Thuhaa | |
JinIgarashi |