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

Migrate to GitHub Actions #173

Merged
merged 3 commits into from
Mar 16, 2021
Merged

Migrate to GitHub Actions #173

merged 3 commits into from
Mar 16, 2021

Conversation

cpanato
Copy link
Contributor

@cpanato cpanato commented Mar 16, 2021

Description

Remove travis-ci and create GitHub Actions workflows for build/test and publish the images

Need to set up the appropriate credentials in the repository to make the publish workflow work properly.

/assign @alexellis

Motivation and Context

How Has This Been Tested?

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.

cpanato added 2 commits March 16, 2021 13:43
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
@cpanato
Copy link
Contributor Author

cpanato commented Mar 16, 2021

Travis will not work :)

@alexellis
Copy link
Owner

Can you test in your own repo and confirm if the GHCR image looks as expected?

@cpanato
Copy link
Contributor Author

cpanato commented Mar 16, 2021

for the ci workflow: https://github.com/cpanato/derek/actions/runs/657599793

for the publish workflow: https://github.com/cpanato/derek/actions/runs/657609156

images are available:

ctadeu/derek:latest
ctadeu/derek:v0.0.1-testing
ctadeu/derek:87d222337022a35d38f9f9c29e294ba73ee1e9c6
quay.io/cpanato/derek:latest
quay.io/cpanato/derek:v0.0.1-testing
quay.io/cpanato/derek:87d222337022a35d38f9f9c29e294ba73ee1e9c6

running the image:

$ docker pull quay.io/cpanato/derek:v0.0.1-testing
....
$ docker run quay.io/cpanato/derek:v0.0.1-testing
2021/03/16 13:00:05 Version: 0.1.4      SHA: 86e85231a20df03bc9187a31c400f4bbc4e2b9ba
2021/03/16 13:00:05 Timeouts: read: 5s, write: 5s hard: 0s.
2021/03/16 13:00:05 Listening on port: 8080
2021/03/16 13:00:05 Writing lock-file to: /tmp/.lock
2021/03/16 13:00:05 Metrics listening on port: 8081

@alexellis
Copy link
Owner

Please could you use GHCR instead of Docker Hub?

@cpanato
Copy link
Contributor Author

cpanato commented Mar 16, 2021

@alexellis updated to use GHCR instead of docker.io

Signed-off-by: Carlos Panato <ctadeu@gmail.com>
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/derek:${{ steps.get_tag.outputs.TAG }}
Copy link
Owner

Choose a reason for hiding this comment

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

No need to change this now, but if github.repository_owner gives the same value as steps.get_repo_owner.outputs.repo_owner, then we could probably remove that step in the future. I think github.repository_owner must be new, because we didn't find it when looking before? cc @utsavanand2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i thought that, but i saw an existing example in another openfaas repo that I followed, but I think we can update all to use the envs the github provide, including the tag

I can open a follow up or if you would like

@alexellis alexellis merged commit b39be98 into alexellis:master Mar 16, 2021
@cpanato cpanato deleted the GH-170 branch March 16, 2021 16:28
@alexellis
Copy link
Owner

@alexellis
Copy link
Owner

And the release build -> https://github.com/alexellis/derek/actions/runs/658249877

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

Successfully merging this pull request may close these issues.

Migrate to GitHub Actions
2 participants