-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚀 chore(
.github/workflows/postgres-build.yml
): Update GitHub Action…
…s workflow for Docker image builds and registry login.
- Loading branch information
Showing
1 changed file
with
15 additions
and
38 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 |
---|---|---|
|
@@ -27,51 +27,28 @@ jobs: | |
attestations: write | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Docker Setup Buildx | ||
# You may pin to the exact commit or the version. | ||
# uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 | ||
uses: docker/[email protected] | ||
#with: | ||
# Buildx version. (eg. v0.3.0) | ||
#version: # optional | ||
# Sets the builder driver to be used | ||
#driver: # optional, default is docker-container | ||
# List of additional driver-specific options. (eg. image=moby/buildkit:master) | ||
#driver-opts: # optional | ||
# BuildKit daemon flags | ||
#buildkitd-flags: # optional | ||
# BuildKit daemon config file | ||
#buildkitd-config: # optional | ||
# Inline BuildKit daemon config | ||
#buildkitd-config-inline: # optional | ||
# Sets up docker build command as an alias to docker buildx build | ||
#install: # optional, default is false | ||
# Switch to this builder instance | ||
#use: # optional, default is true | ||
# Optional address for docker socket or context from `docker context ls` | ||
#endpoint: # optional | ||
# Fixed platforms for current node. If not empty, values take priority over the detected ones | ||
#platforms: # optional | ||
# Append additional nodes to the builder | ||
#append: # optional | ||
# Cache buildx binary to GitHub Actions cache backend | ||
#cache-binary: # optional, default is true | ||
# Cleanup temp files and remove builder at the end of a job | ||
#cleanup: # optional, default is true | ||
# BuildKit daemon config file | ||
#config: # optional | ||
# Inline BuildKit daemon config | ||
#config-inline: # optional | ||
|
||
- name: Log into registry ${{ env.REGISTRY }} | ||
if: github.event_name != 'pull_request' | ||
uses: docker/[email protected] | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build Local Docker image | ||
run: docker buildx build -t ${{ vars.DOCKER_PREFIX }}/postgres:17 ./boot/postgres | ||
run: docker buildx build --push -t ${{ vars.DOCKER_PREFIX }}/postgres:17 ./boot/postgres | ||
|
||
- name: Build zhparser Docker image | ||
run: docker buildx build -t ${{ vars.DOCKER_PREFIX }}/postgres:zhparser ./boot/postgres/zhparser | ||
run: docker buildx build --push -t ${{ vars.DOCKER_PREFIX }}/postgres:zhparser ./boot/postgres/zhparser | ||
|
||
- name: Build postgis Docker image | ||
run: docker buildx build -t ${{ vars.DOCKER_PREFIX }}/postgres:postgis ./boot/postgres/postgis | ||
run: docker buildx build --push -t ${{ vars.DOCKER_PREFIX }}/postgres:postgis ./boot/postgres/postgis | ||
|
||
- name: Build latest Docker image | ||
run: docker buildx build -t ${{ vars.DOCKER_PREFIX }}/postgres:latest ./boot/postgres/postgis | ||
run: docker buildx build --push -t ${{ vars.DOCKER_PREFIX }}/postgres:latest ./boot/postgres/postgis |