Skip to content

Commit 665982d

Browse files
authored
Merge pull request #3 from fly-apps/github-action
Add ci workflow
2 parents 80f91ca + a5d1791 commit 665982d

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Release
2+
3+
on:
4+
create:
5+
6+
jobs:
7+
release:
8+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
9+
runs-on: ubuntu-latest
10+
steps:
11+
-
12+
name: Set up QEMU
13+
uses: docker/setup-qemu-action@v1
14+
-
15+
name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v1
17+
-
18+
name: Login to DockerHub
19+
uses: docker/login-action@v1
20+
with:
21+
username: ${{ secrets.DOCKERHUB_USERNAME }}
22+
password: ${{ secrets.DOCKERHUB_TOKEN }}
23+
- uses: actions/checkout@v2
24+
with:
25+
fetch-depth: 0
26+
-
27+
name: "Fetch latest tag"
28+
id: get-latest-tag
29+
uses: "WyriHaximus/github-action-get-previous-tag@v1"
30+
-
31+
name: Build and push Postgres 14
32+
id: docker_build_14
33+
uses: docker/build-push-action@v2
34+
with:
35+
build-args: |
36+
PG_VERSION=14.6
37+
VERSION=${{ steps.get-latest-tag.outputs.tag }}
38+
context: .
39+
file: ./Dockerfile
40+
push: true
41+
tags: |
42+
flyio/postgres-flex:14
43+
flyio/postgres-flex:14.6
44+
-
45+
name: Postgres 14 Image digest
46+
run: echo ${{ steps.docker_build_14.outputs.digest }}

0 commit comments

Comments
 (0)