diff --git a/README.md b/README.md index 4c23bec..a1fe61d 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,52 @@ # 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 inputInputRequired Description
image-to-push:/td> - (Required) Name of the image you want to push. Most likely the name you used to create it in the previous step.image-to-pushYes + Name of the image you want to push. Most likely the name you used to create the image in the previous step. +
tag(Optional) Tag of the image. Default value: latest.No + Image tag to push.
+ Defaults to latest. +
registry(Required) Registry where to push the image. E.g https://quay.io/usernameYesURL of the registry to push the image to.
+ Eg. https://quay.io/<username>
username(Required) Username to use as credential to authenticate to the registryYesUsername with which to authenticate to the registry.
password(Required) Password to use as credential to authenticate to the registryYesPassword or personal access token with which to authenticate to the registry.
@@ -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. -``` -name: CI +```yaml +name: Build and Push Image on: [push] jobs: build: name: Build image runs-on: ubuntu-latest + env: + IMAGE_NAME: petclinic + BUILT_JAR: "target/spring-petclinic-2.3.0.BUILD-SNAPSHOT.jar" steps: - name: Checkout @@ -59,27 +74,26 @@ jobs: run: | cd ${GITHUB_WORKSPACE} mvn package - - name: Build Action + - name: Build Image uses: redhat-actions/buildah-action@0.0.1 with: - new-image-name: petclinic + new-image-name: ${{ env.IMAGE_NAME }} content: | - target/spring-petclinic-2.3.0.BUILD-SNAPSHOT.jar + ${{ env.BUILT_JAR }} entrypoint: | - java + java -jar - spring-petclinic-2.3.0.BUILD-SNAPSHOT.jar + ${{ env.BUILT_JAR }} port: 8080 - name: Push To Quay uses: redhat-actions/push-to-registry@0.0.1 with: - image-to-push: petclinic + image-to-push: ${{ env.IMAGE_NAME }} registry: ${{ secrets.QUAY_REPO }} username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} + password: ${{ secrets.QUAY_TOKEN }} ``` - ## Contributing 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 -MIT, See [LICENSE](https://github.com/redhat-actions/push-to-registry/blob/main/LICENSE.md) for more information. \ No newline at end of file +MIT, See [LICENSE](./LICENSE) for more information.