Skip to content

Commit

Permalink
Add latest tag to image in build-cads-image.yml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
francesconazzaro committed Feb 12, 2024
1 parent ab22852 commit 95c8801
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/build-cads-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,13 @@ jobs:
CADS_PAT=${{ secrets.CADS_PAT }}
GITHUB_TOKEN=${{ secrets.CADS_PAT }}
GITHUB_EMAIL=${{ secrets.EMAIL_GITHUB }}
GITHUB_USERNAME=${{ secrets.USERNAME_GITHUB }}
GITHUB_USERNAME=${{ secrets.USERNAME_GITHUB }}
- name: Tag ${{ inputs.image_name }} with "latest"
uses: ecmwf-projects/cads-build-farm/.github/workflows/tag.yml@build-also-latest-with-tags
with:
deployment_branch: ${{ inputs.deployment_branch }}
new_tag: latest
image_tag: ${{ inputs.image_tag }}
repo_name: ${{ inputs.image_name }}

7 changes: 5 additions & 2 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
description: 'New tag'
required: true
default: 'test'
repo_name:
description: 'Repository name'
required: true

jobs:
tag-harbor-images:
Expand All @@ -25,7 +28,7 @@ jobs:
with:
repository: ecmwf-projects/cads-deployment
token: ${{ secrets.CADS_PAT }}
ref: ${{ github.event.inputs.deployment_branch }}
ref: ${{ inputs.deployment_branch }}
path: .

- name: Setup Python
Expand All @@ -35,7 +38,7 @@ jobs:
- name: Install Dependencies
run: pip install requests typer
- name: Run Python Script
run: python release.py --image-tag ${{ github.event.inputs.image_tag }} ${{ github.event.inputs.new_tag }}
run: python release.py --repo-name ${{ inputs.repo_name }} --image-tag ${{ inputs.image_tag }} ${{ inputs.new_tag }}
env:
HARBOR_USER: ${{ secrets.HARBOR_USER }}
HARBOR_TOKEN: ${{ secrets.HARBOR_TOKEN }}

0 comments on commit 95c8801

Please sign in to comment.