Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

Migrated from deprecated to GitHub Packages to GHCR#190

Merged
alexmt merged 2 commits intoargoproj-labs:masterfrom
mylesagray:master
Mar 4, 2021
Merged

Migrated from deprecated to GitHub Packages to GHCR#190
alexmt merged 2 commits intoargoproj-labs:masterfrom
mylesagray:master

Conversation

@mylesagray
Copy link
Copy Markdown
Contributor

@mylesagray mylesagray commented Mar 3, 2021

Per comments in #184 I have migrated the CI workflow from the deprecated GitHub Packages to the new GitHub Container Registry.

Note that images will be tagged the same way they are today - and an additional :latest tag will be added to each push as well.

This PR will need a few things done before it is merged:

Once those pre-reqs are met this is safe to merge and should auto build and push fresh multi-arch images to both repos!

/cc @alexmt

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 3, 2021

Codecov Report

Merging #190 (4e27663) into master (2bc3652) will decrease coverage by 1.15%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #190      +/-   ##
==========================================
- Coverage   52.69%   51.53%   -1.16%     
==========================================
  Files          33       34       +1     
  Lines        1577     1690     +113     
==========================================
+ Hits          831      871      +40     
- Misses        586      647      +61     
- Partials      160      172      +12     
Impacted Files Coverage Δ
pkg/services/github.go 28.57% <0.00%> (ø)
pkg/services/services.go 25.00% <0.00%> (+0.30%) ⬆️
pkg/config.go 53.84% <0.00%> (+5.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2bc3652...4e27663. Read the comment docs.

Copy link
Copy Markdown
Collaborator

@alexmt alexmt left a comment

Choose a reason for hiding this comment

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

Thank you @mylesagray . Added one comment

Comment thread .github/workflows/ci.yaml Outdated
push: true
tags: docker.pkg.github.com/argoproj-labs/argocd-notifications/argocd-notifications:${{ env.IMAGE_TAG }}
tags: |
argoproj-labs/argocd-notifications:${{ env.IMAGE_TAG }}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we avoid pushing non latest tag to argoproj-labs ?

We are trying to use dockerhub/argoproj-labs only for official releases. I was hoping to automate it using separate GH action workflow that is triggered manually (similar to https://github.com/argoproj/argo-cd/blob/master/.github/workflows/release.yaml)

Copy link
Copy Markdown
Contributor Author

@mylesagray mylesagray Mar 4, 2021

Choose a reason for hiding this comment

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

@alexmt Would a model similar to this work: https://github.com/argoproj/argo-cd/blob/master/.github/workflows/release.yaml#L2-L12 were only pushes with specific tags cause a push to DockerHub? or do you want it totally manual "click a UI button"?

Additionally, when pushing to DH if we choose the above model where it pushed actual tagged releases and the latest tag - is that acceptable, or are you asking for it to only ever push one image tagged latest and ignore all of the v1.x.x tags?

I can set up two actions workflows then, one for CI for general PRs and merges like we currently have, and another for tagged branches that are actual "releases" if that's what you're after.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I was thinking about Argo CD model - it uses tag with a special name as trigger. After I've learned about workflow_dispatch from your previous PR and now hoping to use Github UI instead. I'm asking to push only to 'latest' on every push to master.

I can set up two actions workflows then, one for CI for general PRs and merges like we currently have, and another for tagged branches that are actual "releases" if that's what you're after.

Very appreciate your help here!

If you don't mind can you remove vx.x.x tag pushes in this PR ( just want to get CI green ) and work on release workflow in next PR?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Works for me, let me open another PR for that!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed @alexmt, will now only push latest :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@alexmt on the failure - you need to provide the repo secrets:

GH_USERNAME - a user with ownership over the argoproj-labs GH Org
GH_PAT - a personal access token with package:read, package:write and package:delete permissions. more here: https://docs.github.com/en/packages/guides/migrating-to-github-container-registry-for-docker-images#authenticating-with-the-container-registry

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thank you! doing it now

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@mylesagray mylesagray changed the title Migrated from deprecated to GitHub Packages to GHCR and Added auto DockerHub push Migrated from deprecated to GitHub Packages to GHCR Mar 4, 2021
@mylesagray mylesagray requested a review from alexmt March 4, 2021 20:08
Copy link
Copy Markdown
Collaborator

@alexmt alexmt left a comment

Choose a reason for hiding this comment

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

Thank you!

@alexmt alexmt merged commit 844ba6f into argoproj-labs:master Mar 4, 2021
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.

2 participants