Skip to content

Commit

Permalink
base64 encode token in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hofq committed Jun 7, 2024
1 parent f026306 commit 5c2db76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
PG_MAJOR_VERSION: 16
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN | base64 }}
REGISTRY_READ_HQ: ${{ secrets.REGISTRY_READ_HQ }}
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion get_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ echo "PGVector - Name: $PGVECTOR_NAME, Digest: ${PGVECTOR_DIGEST:7:5}"
TAG_IDENTIFIER=pg$PG_MAJOR_VERSION-${BITNAMI_DIGEST:7:5}-${PGVECTOR_DIGEST:7:5}
echo "Identifier will be $TAG_IDENTIFIER"

if [ -z "$(skopeo list-tags --registry-token $($GITHUB_TOKEN | base64) docker://ghcr.io/bat-bs/${IMAGE_NAME} | grep $TAG_IDENTIFIER)" ]; then
if [ -z "$(skopeo list-tags --registry-token $GITHUB_TOKEN docker://ghcr.io/bat-bs/${IMAGE_NAME} | grep $TAG_IDENTIFIER)" ]; then
echo "Tag not found in registry. The image will be build."
else
echo "Tag found in registry. The image will not be build."
Expand Down

0 comments on commit 5c2db76

Please # to comment.