项目作者: lotharschulz

项目描述 :
hello github actions
高级语言: Makefile
项目地址: git://github.com/lotharschulz/hello-github-actions.git
创建时间: 2019-04-21T05:23:19Z
项目社区:https://github.com/lotharschulz/hello-github-actions

开源协议:

下载


GitHub Actions

CI/CD Docker images to Dockerhub, GitHub Packages and GitHub Container Registry with GitHub Actions

A repository exploring GitHub Actions to automate Docker deployments.

Deployment targets

Publish Docker Image to GitHub Container Registry

Publishing to GitHub Container Registry requires a @latest/developers/apps/about-apps#personal-access-tokens">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

Publish Docker Image to GitHub Packages

Publishing Docker Images to GitHub Packages using:

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.

CI/CD with Github actions

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.

test, benchmark, docker build/push

Talks & Presentations

Blog Post

CI/CD with GitHub Actions v2

make file targets

build

  1. make build

test

  1. make test
  2. make benchmark

run

  1. make run

build docker image

  1. make build.docker

clean

  1. make clean