From ca9269e369bb5bd44042fd1ef1e85ffb38a37508 Mon Sep 17 00:00:00 2001 From: Chris Elias Date: Wed, 31 Aug 2022 16:32:27 -0400 Subject: [PATCH 1/3] readme on action usage --- README.md | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d7d958..3687501 100644 --- a/README.md +++ b/README.md @@ -1 +1,36 @@ -# publish-integration-image-action \ No newline at end of file +# publish-integration-image-action + +This is a composite action that will publish you image to your Docker Registry. + +## Inputs + +This action requires uses the following inputs: + +| Name | Type | Description | +|--------------------|----------|------------------------------------------------------------------------------------| +| `package-name` | String | Name that the image should be published as to Docker Hub as | +| `docker-username` | String | Username for the docker account to publish under | +| `docker-password` | String | Password for the docker account to publish under | +| `push-to-registry` | String | Determine if the built image should be pushed to registry (Default is 'false') | + +The docker username and password will likely be passed by `secrets`. You must ensure your repo has access to these secret variables + +## Example Usage: + +```yaml +jobs: + ... + + publish-image: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - id: publish-image + uses: jupiterone/publish-integration-image-action@v1.0.3-beta + with: + package-name: 'jupiterone/graph-kubernetes' + docker-username: ${{ secrets.DOCKERHUB_USERNAME }} + docker-password: ${{ secrets.DOCKERHUB_TOKEN }} + push-to-registry: 'true' +``` + From 00332f1cf88beec727be89a3e17343cce60072a7 Mon Sep 17 00:00:00 2001 From: Chris Elias Date: Thu, 1 Sep 2022 12:15:08 -0400 Subject: [PATCH 2/3] address pr feedback --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3687501..2a0dc0d 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,8 @@ jobs: steps: - uses: actions/checkout@v3 - id: publish-image - uses: jupiterone/publish-integration-image-action@v1.0.3-beta + if: env.publish == 'true' # Only publish when releasing a new version to main + uses: jupiterone/publish-integration-image-action@v1 with: package-name: 'jupiterone/graph-kubernetes' docker-username: ${{ secrets.DOCKERHUB_USERNAME }} From e73e76e93fbc5be97112f1c47173820fde2fc333 Mon Sep 17 00:00:00 2001 From: Chris Elias Date: Thu, 1 Sep 2022 12:16:51 -0400 Subject: [PATCH 3/3] address pr feedback --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2a0dc0d..fb97339 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,10 @@ jobs: publish-image: runs-on: ubuntu-latest + if: env.publish == 'true' # Only publish when releasing a new version to main steps: - uses: actions/checkout@v3 - id: publish-image - if: env.publish == 'true' # Only publish when releasing a new version to main uses: jupiterone/publish-integration-image-action@v1 with: package-name: 'jupiterone/graph-kubernetes'