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

Push image on Docker Hub #35

Open
bsctl opened this issue Jun 13, 2023 · 1 comment
Open

Push image on Docker Hub #35

bsctl opened this issue Jun 13, 2023 · 1 comment

Comments

@bsctl
Copy link
Member

bsctl commented Jun 13, 2023

Write a workflow to push the docker image on Docker Hub with the proper tag.

@ludusrusso
Copy link
Collaborator

Note that the workflow is ready, we should only change the registry and provide authentication to docker hub

- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: |
ghcr.io/${{ github.repository }}
tag-sha: true
tag-semver: |
{{version}}
{{major}}.{{minor}}
tag-custom: |
${{steps.get_vars.outputs.branch}}-${{steps.get_vars.outputs.sha}}-${{ steps.get_vars.outputs.ts }}
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
network: host
tags: ${{ steps.docker_meta.outputs.tags }}

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

No branches or pull requests

2 participants