Skip to content

Commit

Permalink
331 dockerhub rate limit - Github Actions aissemble-fastapi, check do…
Browse files Browse the repository at this point in the history
…cker
  • Loading branch information
colinpalmer-pro committed Sep 18, 2024
1 parent 2b84fe6 commit 6af48ac
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.buildBranch }}
# - name: Login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Install required packages
run: |
sudo apt-get update
Expand Down
4 changes: 2 additions & 2 deletions extensions/extensions-docker/aissemble-fastapi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<executable>bash</executable>
<arguments>
<argument>info</argument>
<argument>${project.basedir}/src/main/resources/docker/scripts/check-docker-auth.sh</argument>
</arguments>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

###
# #%L
# aiSSEMBLE::Extensions::Docker::FastAPI
# %%
# Copyright (C) 2021 Booz Allen
# %%
# This software package is licensed under the Booz Allen Public License. All Rights Reserved.
# #L%
###

# check if user is logged in
user_abbrev=$(docker info | grep Username | awk '{print substr($2, 1, 4)}')
if [ -z "$user_abbrev" ]; then
echo "Not authenticated"
else
echo "Authenticated as: $user_abbrev"
fi

0 comments on commit 6af48ac

Please sign in to comment.