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

chore: add a clean parameter to the checkout #324

Merged
merged 7 commits into from
Nov 7, 2024
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
33 changes: 19 additions & 14 deletions .github/actions/argus-builder/docker-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,51 @@ description: Build a Docker Image for Argus

inputs:
image_name:
description: 'Name of the image to build'
description: "Name of the image to build"
required: true
dockerfile:
description: 'Path to the Dockerfile'
description: "Path to the Dockerfile"
required: true
context:
description: 'Path to the build context'
description: "Path to the build context"
required: true
platform:
description: 'Platform to build for'
description: "Platform to build for"
required: false
default: 'linux/arm64'
default: "linux/arm64"
build_args:
description: 'Args for docker build'
description: "Args for docker build"
required: false
default: ''
default: ""
secret_files:
description: 'Files to copy into the build context'
description: "Files to copy into the build context"
required: false
default: ''
default: ""
image_tag:
description: 'Additional tag to apply to the image this is built'
description: "Additional tag to apply to the image this is built"
required: true
github_app_id:
description: 'GitHub App ID'
description: "GitHub App ID"
required: true
github_private_key:
description: 'GitHub App private key'
description: "GitHub App private key"
required: true
clean_checkout:
description: "Whether to clean the repository before checking out"
required: false
default: false

outputs:
image_uri:
description: 'URI of the image that was built'
description: "URI of the image that was built"
value: ${{ steps.ecr_metadata.outputs.IMAGE_URI }}

runs:
using: composite
steps:
- uses: actions/checkout@v4
with:
clean: ${{ inputs.clean_checkout }}
fetch-depth: 0
path: ${{ github.event.repository.name }}
- name: Configure AWS Credentials
Expand Down Expand Up @@ -87,7 +92,7 @@ runs:
lifecycle-policy: core-platform-settings/ecr/lifecycle-policy.json
repository-policy: core-platform-settings/ecr/repository-policy.json
- name: Build And Push
uses: chanzuckerberg/github-actions/.github/actions/docker-build-push@6fe6046403cf16689027cb3981781d8b05fd702b
uses: chanzuckerberg/github-actions/.github/actions/docker-build-push@74d720a183006c0fe0a82f52475befed7d992888
with:
dockerfile: ${{ github.event.repository.name }}/${{ inputs.dockerfile }}
context: ${{ github.event.repository.name }}/${{ inputs.context }}
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/docker-build-push/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ runs:
image: 533267185808.dkr.ecr.us-west-2.amazonaws.com/docker.io/central/tonistiigi/binfmt:latest
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: |
image=533267185808.dkr.ecr.us-west-2.amazonaws.com/docker.io/central/moby/buildkit:master
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
Expand Down
Loading