Skip to content

Commit b7ca2a8

Browse files
soedirgokiwicopple
andauthored
chore: Automatic release on Docker Hub (#25)
Needs secrets: `DOCKER_USERNAME` & `DOCKER_PASSWORD` Co-authored-by: Paul Copplestone <[email protected]>
1 parent b84c9d7 commit b7ca2a8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,15 @@ jobs:
131131
asset_path: ./pg-api-windows.tar.gz
132132
asset_name: pg-api-windows.tar.gz
133133
asset_content_type: application/gzip
134+
135+
- name: Get version
136+
run: echo ::set-env name=VERSION::$(curl -s https://api.github.com/repos/supabase/pg-api/releases/latest | jq .name -r)
137+
138+
- name: Upload image to Docker Hub
139+
if: env.HAS_NEW_RELEASE == 1
140+
uses: docker/build-push-action@v1
141+
with:
142+
username: ${{ secrets.DOCKER_USERNAME }}
143+
password: ${{ secrets.DOCKER_PASSWORD }}
144+
repository: supabase/pg-api
145+
tags: latest,${{ env.VERSION }}

0 commit comments

Comments
 (0)