Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Use buildx and github actions #76

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

Conversation

LucasRoesler
Copy link
Member

Description

  • Update the Dockerfile to support multiarch builds via buildx
  • Add Github Action workflow for build and test
  • Add Github Action workflow to publish the images

Motivation and Context

How Has This Been Tested?

See https://github.com/LucasRoesler/faas-swarm/actions

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have added tests to cover my changes.
  • All new and existing tests passed.

with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
Copy link
Member Author

Choose a reason for hiding this comment

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

I need some guidance on what this secret name should be

Copy link
Member

Choose a reason for hiding this comment

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

Is CR_PAT automated? If not look at our build for faas-netes

Copy link
Member Author

Choose a reason for hiding this comment

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

The automatic value is GITHUB_TOKEN but there might be issues with using this to verify the publish flow in forks because it might only have read access, to be frank the docs are not very great about this use case

https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow

Copy link
Member Author

Choose a reason for hiding this comment

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

Per these docs it worked for github packages https://docs.github.com/en/free-pro-team@latest/actions/guides/publishing-docker-images#publishing-images-to-github-packages and it is the docs that provide for github actions to publish docker images, i was hoping that they didn't deprecate that feature

@LucasRoesler LucasRoesler force-pushed the migrate-to-buildx-and-gha branch 2 times, most recently from f90f8fe to c1ec6ab Compare November 15, 2020 19:46
@alexellis
Copy link
Member

I have a feeling that secrets.GITHUB_TOKEN doesn't work with GHCR. Can you test and confirm?

@alexellis
Copy link
Member

Might be better to mirror faas-netes for the build and upload for consistency as that's what we have in place in PRs so far. I'd like to see all of them use the owner name eventually for the image tag so PRs can be tested.

@LucasRoesler
Copy link
Member Author

Might be better to mirror faas-netes for the build and upload for consistency as that's what we have in place in PRs so far. I'd like to see all of them use the owner name eventually for the image tag so PRs can be tested.

Can you be more concrete about what you want to see changed. I don't understand what you want me to do. I have already specifically mirrored the changes in faas-netes first and then pulled in the changes from faas-cli that used the owner name.

@alexellis
Copy link
Member

Have you tested a release build?

**What**
- Update the Dockerfile to support multiarch builds via buildx
- Add Github Action workflow for build and test
- Add Github Action workflow to publish the images

Signed-off-by: Lucas Roesler <[email protected]>
@LucasRoesler
Copy link
Member Author

@LucasRoesler
Copy link
Member Author

Part of openfaas/faas#1585

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

Successfully merging this pull request may close these issues.

Migrate from Travis to Github Actions
2 participants