mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2025-06-27 11:20:40 -04:00
use variable for registry
This commit is contained in:
parent
de4c977bc3
commit
938c90acda
1 changed files with 12 additions and 1 deletions
13
.github/workflows/build.yml
vendored
13
.github/workflows/build.yml
vendored
|
@ -32,13 +32,24 @@ jobs:
|
|||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set Registry based on GITHUB_SERVER_URL
|
||||
run: |
|
||||
if [[ "${{ github.server_url }}" == *"github.com"* ]]; then
|
||||
echo "REGISTRY=ghcr.io" >> $GITHUB_ENV
|
||||
elif [[ "${{ github.server_url }}" == *"git.thecodedom.com"* ]]; then
|
||||
echo "REGISTRY=git.thecodedom.com" >> $GITHUB_ENV
|
||||
else
|
||||
echo "REGISTRY=ghcr.io" >> $GITHUB_ENV
|
||||
fi
|
||||
echo "Registry is $REGISTRY"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ github.registry }}
|
||||
registry: ${{ env.registry }}
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue