Skip to content

Commit 2febec3

Browse files
chore: add latest tag to the released FDW images to GHCR (#578)
1 parent 03be8ae commit 2febec3

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/publish.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ jobs:
2222
- name: Get Release assets
2323
env:
2424
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25-
run: |-
25+
run: |-
2626
gh release download ${{ github.event.inputs.release }} --dir . --repo ${{ github.repository }}
2727
2828
- name: Release assets downloaded
29-
run: |-
29+
run: |-
3030
ls -la .
3131
3232
- name: Sanitize Version
@@ -91,6 +91,7 @@ jobs:
9191
- name: Push to registry
9292
run: |-
9393
REF="$CORE_REPO/$IMAGE_NAME:$VERSION"
94+
LATEST_REF="$CORE_REPO/$IMAGE_NAME:latest"
9495
oras push $REF \
9596
--config config.json:application/vnd.turbot.steampipe.config.v1+json \
9697
--annotation-file annotations.json \
@@ -100,3 +101,11 @@ jobs:
100101
steampipe_postgres_fdw.so.linux_arm64.gz:application/vnd.turbot.steampipe.fdw.linux-arm64.layer.v1+gzip \
101102
steampipe_postgres_fdw.control:application/vnd.turbot.steampipe.fdw.control.layer.v1+text \
102103
steampipe_postgres_fdw--1.0.sql:application/vnd.turbot.steampipe.fdw.sql.layer.v1+text
104+
105+
# check if the version is NOT an rc version before tagging as latest
106+
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
107+
echo "Tagging as latest: $LATEST_REF"
108+
oras tag $REF $LATEST_REF
109+
else
110+
echo "Skipping latest tag for rc version: $VERSION"
111+
fi

0 commit comments

Comments
 (0)