File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Docker image
2+ on :
3+ release :
4+ types : [published]
5+ jobs :
6+ github-cache :
7+ runs-on : ubuntu-latest
8+ steps :
9+ -
10+ name : Set up Docker Buildx
11+ uses : docker/setup-buildx-action@v1
12+ -
13+ name : Cache Docker layers
14+ uses : actions/cache@v2
15+ with :
16+ path : /tmp/.buildx-cache
17+ key : ${{ runner.os }}-buildx-${{ github.sha }}
18+ restore-keys : |
19+ ${{ runner.os }}-buildx-
20+ - name : Login to Github Packages registry
21+ uses : docker/login-action@v1
22+ with :
23+ registry : docker.pkg.github.com
24+ username : ${{ github.actor }}
25+ password : ${{ github.token }}
26+ -
27+ name : Docker meta
28+ id : docker_meta
29+ uses : crazy-max/ghaction-docker-meta@v1
30+ with :
31+ images : fly-examples/nats-cluster # list of Docker images to use as base name for tags
32+ tag-sha : true # add git short SHA as Docker tag
33+ -
34+ name : Build and push
35+ uses : docker/build-push-action@v2
36+ with :
37+ push : ${{ github.event_name != 'pull_request' }}
38+ tags : ${{ steps.docker_meta.outputs.tags }}
39+ labels : ${{ steps.docker_meta.outputs.labels }}
40+ cache-from : type=local,src=/tmp/.buildx-cache
41+ cache-to : type=local,dest=/tmp/.buildx-cache
You can’t perform that action at this time.
0 commit comments