Skip to content

Commit d84859b

Browse files
authored
Create containerize.yml
1 parent 4aba467 commit d84859b

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/containerize.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
push:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v1
14+
- name: Install dependencies
15+
run: yarn install
16+
- name: Build
17+
run: docker build -t juffalow/react-relay-example .
18+
- name: Push image to Digital Ocean Container Registry
19+
env:
20+
DIGITALOCEAN_ACCESS_TOKEN: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
21+
run: |
22+
VERSION=${GITHUB_REF#"refs/tags/"}
23+
IMAGE_NAME=registry.digitalocean.com/juffalow/react-relay-example
24+
25+
echo $VERSION
26+
echo $IMAGE_NAME
27+
28+
docker tag juffalow/react-relay-example $IMAGE_NAME:$VERSION
29+
30+
doctl auth init
31+
docker push $IMAGE_NAME:$VERSION

0 commit comments

Comments
 (0)