This commit is contained in:
@@ -25,20 +25,19 @@ jobs:
|
||||
echo "latest_tag=${REGISTRY}/${IMAGE_NAME}:latest" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Login to Gitea registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
run: |
|
||||
printf '%s' "${{ secrets.REGISTRY_TOKEN }}" \
|
||||
| docker login "${REGISTRY}" \
|
||||
--username "${{ secrets.REGISTRY_USERNAME }}" \
|
||||
--password-stdin
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
${{ steps.meta.outputs.sha_tag }}
|
||||
${{ steps.meta.outputs.latest_tag }}
|
||||
labels: |
|
||||
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
run: |
|
||||
docker build \
|
||||
--label "org.opencontainers.image.source=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" \
|
||||
--label "org.opencontainers.image.revision=${GITHUB_SHA}" \
|
||||
--tag "${{ steps.meta.outputs.sha_tag }}" \
|
||||
--tag "${{ steps.meta.outputs.latest_tag }}" \
|
||||
.
|
||||
docker push "${{ steps.meta.outputs.sha_tag }}"
|
||||
docker push "${{ steps.meta.outputs.latest_tag }}"
|
||||
|
||||
Reference in New Issue
Block a user