mirror of
https://github.com/crazy-max/diun.git
synced 2025-12-24 06:28:13 +01:00
Publish image to GHCR
This commit is contained in:
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
@@ -84,6 +84,7 @@ jobs:
|
||||
needs: go
|
||||
env:
|
||||
DOCKERHUB_SLUG: crazymax/diun
|
||||
GHCR_SLUG: ghcr.io/crazy-max/diun
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
@@ -93,7 +94,9 @@ jobs:
|
||||
id: docker_meta
|
||||
uses: crazy-max/ghaction-docker-meta@v1
|
||||
with:
|
||||
images: ${{ env.DOCKERHUB_SLUG }}
|
||||
images: |
|
||||
${{ env.DOCKERHUB_SLUG }}
|
||||
${{ env.GHCR_SLUG }}
|
||||
tag-edge: true
|
||||
tag-match: v(.*)
|
||||
tag-match-group: 1
|
||||
@@ -112,6 +115,14 @@ jobs:
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
-
|
||||
name: Login to GHCR
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v1.4.1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ secrets.GHCR_USERNAME }}
|
||||
password: ${{ secrets.GHCR_TOKEN }}
|
||||
-
|
||||
name: Build
|
||||
uses: docker/build-push-action@v2
|
||||
@@ -122,7 +133,7 @@ jobs:
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.docker_meta.outputs.tags }}
|
||||
build-args: |
|
||||
VERSION=${{ steps.prep.outputs.version }}
|
||||
VERSION=${{ steps.docker_meta.outputs.version }}
|
||||
labels: |
|
||||
${{ steps.docker_meta.outputs.labels }}
|
||||
org.opencontainers.image.title=Diun
|
||||
@@ -133,9 +144,12 @@ jobs:
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ env.DOCKERHUB_SLUG }}:${{ steps.docker_meta.outputs.version }}
|
||||
docker buildx imagetools inspect ${{ env.GHCR_SLUG }}:${{ steps.docker_meta.outputs.version }}
|
||||
-
|
||||
name: Inspect
|
||||
name: Inspect image
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
docker pull ${{ env.DOCKERHUB_SLUG }}:${{ steps.docker_meta.outputs.version }}
|
||||
docker image inspect ${{ env.DOCKERHUB_SLUG }}:${{ steps.docker_meta.outputs.version }}
|
||||
docker pull ${{ env.GHCR_SLUG }}:${{ steps.docker_meta.outputs.version }}
|
||||
docker image inspect ${{ env.GHCR_SLUG }}:${{ steps.docker_meta.outputs.version }}
|
||||
|
||||
@@ -2,7 +2,13 @@
|
||||
|
||||
## About
|
||||
|
||||
Diun provides automatically updated Docker :whale: images within [Docker Hub](https://hub.docker.com/r/crazymax/diun).
|
||||
Diun provides automatically updated Docker :whale: images within several registries:
|
||||
|
||||
| Registry | Image |
|
||||
|--------------------------------------------------------------------------------------------------|---------------------------------|
|
||||
| [Docker Hub](https://hub.docker.com/r/crazymax/diun/) | `crazymax/diun` |
|
||||
| [GitHub Container Registry](https://github.com/users/crazy-max/packages/container/package/diun) | `ghcr.io/crazy-max/diun` |
|
||||
|
||||
It is possible to always use the latest stable tag or to use another service that handles updating Docker images.
|
||||
|
||||
Following platforms for this image are available:
|
||||
|
||||
Reference in New Issue
Block a user