ContainerSolutions / kubernetes-examples

Minimal self-contained examples of standard Kubernetes features and patterns in YAML
https://k8s-examples.container-solutions.com/
MIT License
1.4k stars 299 forks source link

github action to release and automagically update version and sha #11

Closed lalyos closed 4 years ago

lalyos commented 4 years ago

This PR adds a new github action workflow:

Usage

Once it's merged you just create a new tag (starting with "v") on master, and the workflow does the rest:

See it in action

I have tested it on my own fork, see the result:

I was trying to use the action: github.com/stefanzweifel/git-auto-commit-action but it seems this plugin cannot handle pushing to a different branch. It is triggered by the git tag, so it will be a "detached head" and than couldn't handle switching to the master branch.

see: action error

So I ended up duck-taping a bunch of git command to implement a safe switch to master.