mirror of https://github.com/scribd/objinsync
automate public docker image release (#15)
This commit is contained in:
parent
5bc094bc1e
commit
173c691211
|
@ -26,6 +26,10 @@ jobs:
|
|||
- name: Run test
|
||||
run: make test
|
||||
|
||||
- name: Test Docker build
|
||||
run: docker build --rm -t ghcr.io/scribd/objinsync:latest .
|
||||
|
||||
|
||||
release:
|
||||
name: Release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
|
@ -53,3 +57,10 @@ jobs:
|
|||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and publish docker image
|
||||
run: |
|
||||
VERSION=${GITHUB_REF##*/}
|
||||
echo ${SCRIBDBOT_GH_CONTAINER_REGISTRY_TOKEN} | docker login ghcr.io -u scribdbot --password-stdin
|
||||
docker build --rm -t "ghcr.io/scribd/objinsync:${VERSION}" .
|
||||
docker push "ghcr.io/scribd/objinsync:${VERSION}"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
FROM golang:1.16.3 as build
|
||||
LABEL org.opencontainers.image.source https://github.com/scribd/objinsync
|
||||
ADD . /app
|
||||
WORKDIR /app
|
||||
|
||||
|
|
Loading…
Reference in New Issue