Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

add initial docker push workflow #111

Merged
merged 2 commits into from
Oct 6, 2022
Merged

add initial docker push workflow #111

merged 2 commits into from
Oct 6, 2022

Conversation

rndmh3ro
Copy link
Contributor

@rndmh3ro rndmh3ro commented Oct 6, 2022

This adds a workflow to push images to dockerhub.

You need to create two variables in the repo for the username and token:

          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}

This pushes two tags: latest and the git-tag.

I couldn't test it but hope that it will mostly work and you can then iterate on it.

@dimabru
Copy link
Contributor

dimabru commented Oct 6, 2022

Hey @rndmh3ro
I've added the required secrets and approved the workflow :)

Few things to note here:

  1. I suggest adding a temp workflow to test this behavior (you can trigger it on push to branch)
  2. We need to make a slight change to the contents of the Dockerfile as well.
    The following line is no longer required since we don't need to pull anything from github anymore
    RUN curl -H "Authorization: token $GITHUB_TOKEN" --silent "https://api.github.com/repos/allero-io/allero-wip/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' > cli-version
    Instead, you can inject the cli version to the Dockerfile using --build-arg

Copy link
Contributor

@dimabru dimabru left a comment

Choose a reason for hiding this comment

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

Thanks for this pr :)
Please see comment above

@rndmh3ro
Copy link
Contributor Author

rndmh3ro commented Oct 6, 2022

@dimabru dimabru linked an issue Oct 6, 2022 that may be closed by this pull request
@dimabru
Copy link
Contributor

dimabru commented Oct 6, 2022

Amazing!!
Thanks a lot :)

@dimabru dimabru merged commit a3c51d5 into allero-io:main Oct 6, 2022
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.

Automatically Publish Dockerimages
2 participants