A repository exploring GitHub Actions to automate Docker deployments.
- Dockerhub - https://hub.docker.com/repository/docker/lotharschulz/hello-github-actions
- GitHub Container Registry - https://github.com/lotharschulz?ecosystem=container&tab=packages
- (GitHub Docker Registry - https://github.com/lotharschulz?ecosystem=docker&tab=packages)
Publishing to GitHub Container Registry requires a personal access token with these scopes:
- repo (full access)
- write:packages
- delete:packages
Store the personal access token value in a repository encypted secret (e.g. CR_PAT
)
Use the repository encypted secret in a workflow file: GCR_PASSWORD: ${{ secrets.CR_PAT }}
Find the published docker images in packages type container: https://github.com/[username]?ecosystem=container&tab=packages. Please note: these images' visibility is private.
GitHub actions workflow file: https://github.com/lotharschulz/hello-github-actions/blob/main/.github/workflows/cicd.yml#L209-L228
Publishing Docker Images to GitHub Packages using:
- build-push-action: https://github.com/lotharschulz/hello-github-actions/blob/main/.github/workflows/cicd.yml#L160-L189
- docker cli: https://github.com/lotharschulz/hello-github-actions/blob/main/.github/workflows/cicd.yml#L191-L207
Find the published docker images in packages type docker: https://github.com/[username]?ecosystem=docker&tab=packages. These images' visibility is public.
See also Publishing Docker images.
This repository contains a workflow to
- test the go code
- benchmark the go code
- builds a docker image & uploads it to dockerhub
All that is defined in cicd.yml file.
- Open Source CI/CD Components for GitHub Actions - All Day DEv Ops, online 2021 (remote). Slides: ls.info Open Source CI/CD Components for GitHub Actions.pdf
- CI/CD with GitHub Actions - deploy Docker image to Dockerhub and GitHub Container Registry - DevOpsCon, London 2021 (remote). Slides: ls.info CI/CD with GitHub Actions.pdf
- Open Source CI/CD components for GitHub Actions - Fossasia Summit 2020 (remote). Slides: ls.info Open-Source-CI_CD-components-for-GitHub-Actions-Fossasia-Summit-2020.pdf
- Continuous Integration & Delivery with GitHub Actions - Auto Code EU. Slides: ls.info CI/CD with GitHub Actions Auto Code Nov 2019.pdf
make build
make test
make benchmark
make run
make build.docker
make clean