nex
3bde3bf3b0
Some checks failed
Publish Docker image / Push Docker image to Docker Hub (push) Failing after 2m7s
47 lines
No EOL
1.2 KiB
YAML
47 lines
No EOL
1.2 KiB
YAML
name: Publish Docker image
|
|
|
|
on: [push]
|
|
|
|
env:
|
|
REGISTRY: git.i-am.nexus
|
|
IMAGE_NAME: drop-in-url-previews
|
|
|
|
jobs:
|
|
push_to_registry:
|
|
name: Push Docker image to Docker Hub
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
packages: write
|
|
contents: read
|
|
attestations: write
|
|
pages: write
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to CR
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: git.i-am.nexus
|
|
username: nex
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Extract metadata (tags, labels) for Docker
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
- name: Build and push Docker image
|
|
id: push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max |