fix issue with pushing docker image

Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
This commit is contained in:
Luca Stocchi 2020-11-16 14:06:29 +01:00
parent 9f4af4759e
commit e335d23f38
No known key found for this signature in database
GPG key ID: 930BB00F3FCF30A4
5 changed files with 50 additions and 8 deletions

View file

@ -24,7 +24,7 @@ Push-to-registry is a GitHub Action for pushing an OCI-compatible image to any r
<tr>
<td>registry</td>
<td>(Required) Registry where to push the image. E.g https://quay.io/yourusername/yourrepo</td>
<td>(Required) Registry where to push the image. E.g https://quay.io/username</td>
</tr>
<tr>
@ -38,6 +38,47 @@ Push-to-registry is a GitHub Action for pushing an OCI-compatible image to any r
</tr>
</table>
## Examples
The example below shows how the `push-to-registry` action can be used to push an image created by the [`buildah-action`](https://github.com/redhat-actions/buildah-action) in an early step.
```
name: CI
on: [push]
jobs:
build:
name: Build image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Maven
run: |
cd ${GITHUB_WORKSPACE}
mvn package
- name: Build Action
uses: redhat-actions/buildah-action@0.0.1
with:
new-image-name: petclinic
content: |
target/spring-petclinic-2.3.0.BUILD-SNAPSHOT.jar
entrypoint: |
java
-jar
spring-petclinic-2.3.0.BUILD-SNAPSHOT.jar
port: 8080
- name: Push To Quay
uses: redhat-actions/push-to-registry@0.0.1
with:
image-to-push: petclinic
registry: ${{ secrets.QUAY_REPO }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
```
## Contributing