Skip to content

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.

3 participants