tags: ${{ steps.docker.outputs.tags }}
This commit is contained in:
parent
4ce1d0f658
commit
2a7f1314c4
1 changed files with 20 additions and 13 deletions
|
@ -10,20 +10,27 @@ jobs:
|
|||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Docker Login to Forgejo Registry
|
||||
- name: Repository meta
|
||||
id: repository
|
||||
run: |
|
||||
registry=${{ github.server_url }}
|
||||
registry=${registry##http*://}
|
||||
echo "registry=${registry}" >> "$GITHUB_OUTPUT"
|
||||
echo "registry=${registry}"
|
||||
repository="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')"
|
||||
echo "repository=${repository}" >> "$GITHUB_OUTPUT"
|
||||
echo "repository=${repository}"
|
||||
- name: Docker meta
|
||||
uses: docker/metadata-action@v5
|
||||
id: docker
|
||||
with:
|
||||
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}
|
||||
- name: Login to registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ forgejo.instance_url }}/packages/${{ github.repository_owner }}/${{ github.repository }}
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.FORGEJO_PACKAGE_REGISTRY_TOKEN }}
|
||||
|
||||
registry: ${{ steps.repository.outputs.registry }}
|
||||
username: ${{ secrets.PACKAGES_USER }}
|
||||
password: ${{ secrets.PACKAGES_TOKEN }}
|
||||
- name: Build and Push Docker Image
|
||||
id: docker_build_push
|
||||
uses: docker/build-push-action@v5
|
||||
|
@ -31,7 +38,7 @@ jobs:
|
|||
context: .
|
||||
file: Dockerfile
|
||||
push: true
|
||||
tags: ${{ forgejo.instance_url }}/packages/${{ github.repository_owner }}/${{ github.repository }}:${{ github.sha }}
|
||||
tags: ${{ steps.docker.outputs.tags }}
|
||||
labels: |
|
||||
org.opencontainers.image.title=${{ github.repository }}
|
||||
org.opencontainers.image.version=${{ github.sha }}
|
||||
|
|
Loading…
Reference in a new issue