Skip to content

Commit

Permalink
Merge pull request #52 from humanitec/show-v2
Browse files Browse the repository at this point in the history
chore: use v2 inside the readme
  • Loading branch information
johanneswuerbach authored Jun 26, 2024
2 parents dd3f83b + 0d74551 commit 28a6b69
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ to the action using a variable expansion. For example, if the token is store as
the following code should be used to pass it to the action:

```yaml
uses: humanitec/build-push-to-humanitec@v1
uses: humanitec/build-push-to-humanitec@v2
with:
humanitec-token: ${{ secrets.HUMANITEC_TOKEN }}
organization: awesome-company
Expand Down Expand Up @@ -47,33 +47,34 @@ _Optional_ The same as `context`, use `context` instead.
_Optional_ Define your own tag for the docker image to be tagged with.

```yaml
uses: humanitec/build-push-to-humanitec@v1
uses: humanitec/build-push-to-humanitec@v2
with:
humanitec-token: ${{ secrets.HUMANITEC_TOKEN }}
organization: awesome-company
tag: latest
```

### `ref`

_Optional_ Define your own ref to be sent to Humanitec instead of GitHub action's GITHUB_REF.

```yaml
uses: humanitec/build-push-to-humanitec@v1
uses: humanitec/build-push-to-humanitec@v2
with:
humanitec-token: ${{ secrets.HUMANITEC_TOKEN }}
organization: awesome-company
ref: refs/heads/main
```

> **_NOTE:_** For auto-deployment to work on GitHub action trigger: `on: pull_request`, set `ref: refs/pr_head/${{ github.event.pull_request.head.ref }}`
> **_NOTE:_** For auto-deployment to work on GitHub action trigger: `on: pull_request`, set `ref: refs/pr_head/${{ github.event.pull_request.head.ref }}`

### `auto-tag`

_Optional_ Use `auto-tag` when you want to push tags/release by their git name (e.g. `refs/tags/MY_TAG_NAME`).
> **_CAUTION:_** Images produced by this feature can be overwritten by branches with the same name - without a way to restore.

```yaml
uses: humanitec/build-push-to-humanitec@v1
uses: humanitec/build-push-to-humanitec@v2
with:
humanitec-token: ${{ secrets.HUMANITEC_TOKEN }}
organization: awesome-company
Expand All @@ -86,7 +87,7 @@ _Optional_ Use `additional-docker-arguments` if you need to provide additional a
> NOTE: You can provide multiple argument by placing them in one long list of commands, e.g., `--build-arg env1=value1 --build-arg env2=value2`.

```yaml
uses: humanitec/build-push-to-humanitec@v1
uses: humanitec/build-push-to-humanitec@v2
with:
humanitec-token: ${{ secrets.HUMANITEC_TOKEN }}
organization: awesome-company
Expand All @@ -95,10 +96,10 @@ _Optional_ Use `additional-docker-arguments` if you need to provide additional a

### `external-registry-url`

_Optional_ Push the image to an external container registry. This registry does not need to be [registered with Humanitec](https://docs.humanitec.com/guides/connect-ci-setup/container-registries) and authentication needs to be done before calling this action (e.g. using workload identity).
_Optional_ Push the image to an external container registry. This registry does not need to be [registered with Humanitec](https://docs.humanitec.com/guides/connect-ci-setup/container-registries) and authentication needs to be done before calling this action (e.g. using workload identity).

```yaml
uses: humanitec/build-push-to-humanitec@v1
uses: humanitec/build-push-to-humanitec@v2
with:
humanitec-token: ${{ secrets.HUMANITEC_TOKEN }}
organization: awesome-company
Expand All @@ -114,13 +115,12 @@ Will push the resulting image to `europe-west3-docker.pkg.dev/gcp-project/reposi
## Example usage

```yaml
uses: humanitec/build-push-to-humanitec@v1
uses: humanitec/build-push-to-humanitec@v2
with:
humanitec-token: ${{ secrets.HUMANITEC_TOKEN }}
organization: awesome-company
```


## Development

Running the tests requires an Humanitec account. Once this is created, the following environment variables need to be configure:
Expand Down

0 comments on commit 28a6b69

Please sign in to comment.