Skip to content

Commit

Permalink
Merge pull request #79 from draios/DEVX-1916-disable-push-to-artifact…
Browse files Browse the repository at this point in the history
…ory-by-default

feat: Set push_to_gar enabled by default and disable push_to_artifactory
  • Loading branch information
giovinazzorocco authored Oct 29, 2024
2 parents c700092 + cf9307e commit 6db4ea7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
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
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

0 comments on commit 6db4ea7

Please sign in to comment.