@@ -22,20 +22,29 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
- name: Extract Registry Hostname
|
||||
id: registry
|
||||
run: |
|
||||
# Strip https:// or http:// prefix using bash parameter expansion
|
||||
URL="${{ github.server_url }}"
|
||||
HOST="${URL#*://}"
|
||||
echo "host=$HOST" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Docker Meta Action
|
||||
uses: docker/metadata-action@v6
|
||||
id: meta
|
||||
with:
|
||||
images: ${{ github.server_url }}/${{ github.repository }}
|
||||
images: ${{ steps.registry.outputs.host }}/${{ github.repository }}
|
||||
tags: |
|
||||
type=ref,event=tag
|
||||
type=sha,format=short
|
||||
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
|
||||
|
||||
- name: Log in to Gitea Container Registry
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: ${{ github.server_url }}
|
||||
username: beejay
|
||||
registry: ${{ steps.registry.outputs.host }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
password: ${{ secrets.TOKEN }}
|
||||
|
||||
- name: Build Docker image
|
||||
|
||||
Reference in New Issue
Block a user