-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds a GitHub action to build and deploy our CI image. This will any of us to rebuild and deploy the CI image, and test it better before deployment.
- Loading branch information
1 parent
8183d12
commit bfbdd1b
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Build CI Image | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'docker/ci/**' | ||
- '.github/workflows/ci_image_build.yml' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Cache Docker layers | ||
uses: actions/cache@v2 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-ci-buildx-debian-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-ci-buildx-debian | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: false | ||
load: true | ||
context: . | ||
file: ./docker/ci/Dockerfile | ||
tags: timescaledev/rust-pgx:latest | ||
|
||
- name: Push | ||
id: image_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: ${{ github.event_name == 'workflow_dispatch' }} | ||
context: . | ||
file: ./docker/ci/Dockerfile | ||
tags: timescaledev/rust-pgx:latest | ||
|
||
- name: Image digest | ||
run: echo ${{ steps.image_build.outputs.digest }} |