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

Build using the Okteto Build GitHub Action #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pchico83
Copy link
Contributor

@pchico83 pchico83 commented Nov 28, 2023

The main changes proposed in this PR are:

  • Use the Okteto Build GiHub Action to build the image
  • Use platform to build ARM and AMD images
  • Build on PR and merge. Push on release. Use if: ${{ github.event_name == 'release' }} to this end
  • Once we support multi-image builds, we can reuse the action to push to several registries

file: Dockerfile
buildargs: "COMMIT_SHA=${{ github.sha }}"
platform: linux/amd64,linux/arm64
tag: ${{ steps.tag.outputs.TAG }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can push to more than one registry if the Okteto CLI supports multi-tag builds

url: ${{ secrets.OKTETO_PRODUCT_URL }}
token: ${{ secrets.OKTETO_PRODUCT_TOKEN }}

- name: Login to DockerHub
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could define these credentials in product.okteto.dev, but that would give us push permissions when running okteto build locally. I think it's more secured to define these credentials as GiHub secrets

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, I think it is better to keep them as GitHub secrets

url: ${{ secrets.OKTETO_PRODUCT_URL }}
token: ${{ secrets.OKTETO_PRODUCT_TOKEN }}

- name: Login to DockerHub
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, I think it is better to keep them as GitHub secrets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants