Skip to content

Commit

Permalink
Added tag parsing & checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
TBeijen committed Jul 24, 2024
1 parent d8ba7b8 commit 0f6471e
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,26 @@ jobs:
needs:
- build
steps:
- name: Test docker tags
run: echo "docker_image_tags = ${{ needs.build.outputs.docker_image_tags }}"
- name: Extract sha tag
id: extract-sha-tag
run: |
tags="${{ needs.build.outputs.docker_image_tags }}""
echo "Docker image tags:"
echo "$tags"
sha_tag=$(echo "$tags" | grep -oE 'ghcr.io/[^:]+:sha-[^ ]+')
if [ -z "$sha_tag" ]; then
echo "No tag starting with 'sha-' found."
exit 1
else
echo "Extracted sha- tag: $sha_tag"
echo "::set-output name=sha_tag::$sha_tag"
fi
- name: GitOps Checkout
uses: actions/checkout@v4
with:
repository: tbeijen/tbnl-www-gitops
ref: main
token: ${{ secrets.TBNL_BOT_PAT }}
fetch-depth: 0
path: tbnl-www-gitops

0 comments on commit 0f6471e

Please sign in to comment.