mirror of
https://gitea.com/docker/build-push-action.git
synced 2024-11-22 17:39:38 +01:00
Add example to update DockerHub repo description
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
c27a49bd68
commit
f5974ebd2b
1 changed files with 46 additions and 1 deletions
47
README.md
47
README.md
|
@ -25,6 +25,7 @@ ___
|
||||||
* [Local registry](#local-registry)
|
* [Local registry](#local-registry)
|
||||||
* [Leverage GitHub cache](#leverage-github-cache)
|
* [Leverage GitHub cache](#leverage-github-cache)
|
||||||
* [Complete workflow](#complete-workflow)
|
* [Complete workflow](#complete-workflow)
|
||||||
|
* [Update DockerHub repo description](#update-dockerhub-repo-description)
|
||||||
* [Customizing](#customizing)
|
* [Customizing](#customizing)
|
||||||
* [inputs](#inputs)
|
* [inputs](#inputs)
|
||||||
* [outputs](#outputs)
|
* [outputs](#outputs)
|
||||||
|
@ -256,7 +257,7 @@ jobs:
|
||||||
### Leverage GitHub cache
|
### Leverage GitHub cache
|
||||||
|
|
||||||
You can leverage [GitHub cache](https://docs.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows)
|
You can leverage [GitHub cache](https://docs.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows)
|
||||||
using [@actions/cache](https://github.com/actions/cache) with this action.
|
using [actions/cache](https://github.com/actions/cache) with this action.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: ci
|
name: ci
|
||||||
|
@ -365,6 +366,50 @@ jobs:
|
||||||
tags: ${{ steps.prep.outputs.tags }}
|
tags: ${{ steps.prep.outputs.tags }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Update DockerHub repo description
|
||||||
|
|
||||||
|
You can update the [Docker Hub repository description](https://docs.docker.com/docker-hub/repos/) using
|
||||||
|
a third-party action called [Docker Hub Description](https://github.com/peter-evans/dockerhub-description)
|
||||||
|
with this action.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
main:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
-
|
||||||
|
name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
-
|
||||||
|
name: Build and push
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
tags: user/app:latest
|
||||||
|
-
|
||||||
|
name: Update repo description
|
||||||
|
uses: peter-evans/dockerhub-description@v2
|
||||||
|
env:
|
||||||
|
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
|
DOCKERHUB_REPOSITORY: user/app
|
||||||
|
```
|
||||||
|
|
||||||
## Customizing
|
## Customizing
|
||||||
|
|
||||||
### inputs
|
### inputs
|
||||||
|
|
Loading…
Reference in a new issue