Refactor Gitea Registry login to use SERVER_URL variable for improved clarity
Build and Push Reader Image / docker (push) Successful in 1m18s
Build and Push Reader Image / docker (push) Successful in 1m18s
This commit is contained in:
@@ -19,18 +19,23 @@ jobs:
|
|||||||
|
|
||||||
- name: Log in to Gitea Registry
|
- name: Log in to Gitea Registry
|
||||||
env:
|
env:
|
||||||
REGISTRY: ${{ secrets.GITEA_REGISTRY }}
|
SERVER_URL: ${{ gitea.server_url }}
|
||||||
USERNAME: ${{ gitea.actor }}
|
USERNAME: ${{ gitea.actor }}
|
||||||
PASSWORD: ${{ secrets.TOKEN }}
|
PASSWORD: ${{ secrets.TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
|
REGISTRY="${SERVER_URL#https://}"
|
||||||
|
REGISTRY="${REGISTRY#http://}"
|
||||||
echo "$PASSWORD" | docker login "$REGISTRY" -u "$USERNAME" --password-stdin
|
echo "$PASSWORD" | docker login "$REGISTRY" -u "$USERNAME" --password-stdin
|
||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
env:
|
env:
|
||||||
REGISTRY: ${{ secrets.GITEA_REGISTRY }}
|
SERVER_URL: ${{ gitea.server_url }}
|
||||||
REPOSITORY: ${{ gitea.repository }}
|
REPOSITORY: ${{ gitea.repository }}
|
||||||
REF: ${{ gitea.ref }}
|
REF: ${{ gitea.ref }}
|
||||||
run: |
|
run: |
|
||||||
|
REGISTRY="${SERVER_URL#https://}"
|
||||||
|
REGISTRY="${REGISTRY#http://}"
|
||||||
|
|
||||||
if [[ "$REF" == refs/tags/v* ]]; then
|
if [[ "$REF" == refs/tags/v* ]]; then
|
||||||
TAG="${REF#refs/tags/}"
|
TAG="${REF#refs/tags/}"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user