diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..2b2aa7cc --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,46 @@ +name: Release + +on: + create: + +jobs: + release: + if: ${{ startsWith(github.ref, 'refs/tags/v') }} + runs-on: ubuntu-latest + steps: + - + name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - + name: "Fetch latest tag" + id: get-latest-tag + uses: "WyriHaximus/github-action-get-previous-tag@v1" + - + name: Build and push Postgres 14 + id: docker_build_14 + uses: docker/build-push-action@v2 + with: + build-args: | + PG_VERSION=14.6 + VERSION=${{ steps.get-latest-tag.outputs.tag }} + context: . + file: ./Dockerfile + push: true + tags: | + flyio/postgres-flex:14 + flyio/postgres-flex:14.6 + - + name: Postgres 14 Image digest + run: echo ${{ steps.docker_build_14.outputs.digest }} \ No newline at end of file