Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Set push_to_gar enabled by default and disable push_to_artifactory #79

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ GitHub Action for build and push docker images, Sysdig way
- `dry_run`: whether to actually create git tag and push the image (default: false)
- `external_tag`: use this tag instead of having the action calculate it
- `latest_tag`: "generate `latest` tag for the image". Default: `false`
- `push_to_artifactory`: whether push image to artifactory (default: true)
- `push_to_artifactory`: whether push image to artifactory (default: false)
- `push_to_quay`: whether push image to quay.io (default: false)
- `push_to_gar`: whether push image to GAR (default: true)
- `artifactory_prefix`: prefix for artifactory repository. Default: `docker.internal.sysdig.com`
- `quay_prefix`: prefix for quay repository. Default: `quay.io/sysdig`
- `gar_prefix`: prefix for GAR repository. Default: `us-docker.pkg.dev/sysdig-artifact-registry-dev/gar-docker/infra`

- `artifactory_username`: "Artifactory Username Secret (default is empty string) "
- `artifactory_password`: "Artifactory Password Secret (default is empty string)"
Expand All @@ -29,10 +31,13 @@ GitHub Action for build and push docker images, Sysdig way
- `quay_username`: "Quay Username Secret (default is empty string)"
- `quay_password`: "Quay Password Secret (default is empty string)"

- `gar_password`: "GAR Password Secret (default is empty string)"

## Caveats

- If `artifactory_username`/`artifactory_password` tuple is empty the action will skip login to artifactory
- If `quay_username`/`quay_password` tuple is empty the action will skip login to quay
- If `gar_password` value is empty the action will skip login to GAR

## Outputs

Expand Down Expand Up @@ -81,8 +86,8 @@ jobs:
context_path: "containers/redis"
dockerfile: "Dockerfile"
dry_run: ${{ ! ((github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run == 'false')) }}
artifactory_username: ${{ secrets.ARTIFACTORY_USERNAME }}
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
gar_prefix: "us-docker.pkg.dev/sysdig-artifact-registry-dev/gar-docker/infra"
gar_password: ${{ secrets.GAR_PASSWORD }}
quay_username: ${{ secrets.QUAY_USERNAME }}
quay_password: ${{ secrets.QUAY_PASSWORD }}
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions action.yml
giovinazzorocco marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,18 @@ inputs:
required: false
default: "true"

# flags for pushing to artifactory or quay
# flags for pushing to GAR, artifactory or quay
push_to_artifactory:
description: "whether to push the image to artifactory"
default: "true"
default: "false"
required: false
push_to_quay:
description: "whether to push the image to quay"
default: "false"
required: false
push_to_gar:
description: "whether to push the image to gar"
default: "false"
default: "true"
required: false

artifactory_prefix:
Expand Down Expand Up @@ -133,7 +133,7 @@ inputs:
gar_password:
description: "GAR Password Secret"
default: ""
required: false
required: true
github_token:
description: "GITHUB Token used to tag the repo"
required: true
Expand Down