mirror of
https://github.com/redhat-actions/push-to-registry.git
synced 2025-02-23 02:21:22 +01:00
Update readme
Signed-off-by: Tim Etchells <tetchell@redhat.com>
This commit is contained in:
parent
e335d23f38
commit
b524b59b33
1 changed files with 33 additions and 19 deletions
52
README.md
52
README.md
|
@ -1,40 +1,52 @@
|
||||||
# push-to-registry
|
# push-to-registry
|
||||||
|
|
||||||
Push-to-registry is a GitHub Action for pushing an OCI-compatible image to any registry.
|
Push-to-registry is a GitHub Action for pushing an OCI-compatible image to an image registry, such as Dockerhub, Quay.io, or an OpenShift integrated registry.
|
||||||
|
|
||||||
## Action Inputs
|
## Action Inputs
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Action input</th>
|
<th>Input</th>
|
||||||
|
<th>Required</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>image-to-push:/td>
|
<td>image-to-push</td>
|
||||||
<td>(Required) Name of the image you want to push. Most likely the name you used to create it in the previous step.</td>
|
<td>Yes</td>
|
||||||
|
<td>
|
||||||
|
Name of the image you want to push. Most likely the name you used to create the image in the previous step.
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>tag</td>
|
<td>tag</td>
|
||||||
<td>(Optional) Tag of the image. Default value: latest.</td>
|
<td>No</td>
|
||||||
|
<td>
|
||||||
|
Image tag to push.<br>
|
||||||
|
Defaults to <code>latest</code>.
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>registry</td>
|
<td>registry</td>
|
||||||
<td>(Required) Registry where to push the image. E.g https://quay.io/username</td>
|
<td>Yes</td>
|
||||||
|
<td>URL of the registry to push the image to.<br>
|
||||||
|
Eg. <code>https://quay.io/<username></code></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>username</td>
|
<td>username</td>
|
||||||
<td>(Required) Username to use as credential to authenticate to the registry</td>
|
<td>Yes</td>
|
||||||
|
<td>Username with which to authenticate to the registry.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>password</td>
|
<td>password</td>
|
||||||
<td>(Required) Password to use as credential to authenticate to the registry</td>
|
<td>Yes</td>
|
||||||
|
<td>Password or personal access token with which to authenticate to the registry.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@ -42,14 +54,17 @@ Push-to-registry is a GitHub Action for pushing an OCI-compatible image to any r
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
```
|
```yaml
|
||||||
name: CI
|
name: Build and Push Image
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build image
|
name: Build image
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
IMAGE_NAME: petclinic
|
||||||
|
BUILT_JAR: "target/spring-petclinic-2.3.0.BUILD-SNAPSHOT.jar"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -59,27 +74,26 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cd ${GITHUB_WORKSPACE}
|
cd ${GITHUB_WORKSPACE}
|
||||||
mvn package
|
mvn package
|
||||||
- name: Build Action
|
- name: Build Image
|
||||||
uses: redhat-actions/buildah-action@0.0.1
|
uses: redhat-actions/buildah-action@0.0.1
|
||||||
with:
|
with:
|
||||||
new-image-name: petclinic
|
new-image-name: ${{ env.IMAGE_NAME }}
|
||||||
content: |
|
content: |
|
||||||
target/spring-petclinic-2.3.0.BUILD-SNAPSHOT.jar
|
${{ env.BUILT_JAR }}
|
||||||
entrypoint: |
|
entrypoint: |
|
||||||
java
|
java
|
||||||
-jar
|
-jar
|
||||||
spring-petclinic-2.3.0.BUILD-SNAPSHOT.jar
|
${{ env.BUILT_JAR }}
|
||||||
port: 8080
|
port: 8080
|
||||||
- name: Push To Quay
|
- name: Push To Quay
|
||||||
uses: redhat-actions/push-to-registry@0.0.1
|
uses: redhat-actions/push-to-registry@0.0.1
|
||||||
with:
|
with:
|
||||||
image-to-push: petclinic
|
image-to-push: ${{ env.IMAGE_NAME }}
|
||||||
registry: ${{ secrets.QUAY_REPO }}
|
registry: ${{ secrets.QUAY_REPO }}
|
||||||
username: ${{ secrets.QUAY_USERNAME }}
|
username: ${{ secrets.QUAY_USERNAME }}
|
||||||
password: ${{ secrets.QUAY_PASSWORD }}
|
password: ${{ secrets.QUAY_TOKEN }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
This is an open source project open to anyone. This project welcomes contributions and suggestions!
|
This is an open source project open to anyone. This project welcomes contributions and suggestions!
|
||||||
|
@ -90,4 +104,4 @@ If you discover an issue please file a bug in [GitHub issues](https://github.com
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT, See [LICENSE](https://github.com/redhat-actions/push-to-registry/blob/main/LICENSE.md) for more information.
|
MIT, See [LICENSE](./LICENSE) for more information.
|
||||||
|
|
Loading…
Add table
Reference in a new issue