Merge pull request #680 from cybertec-postgresql/dependabot/github_ac… #48
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
name: Update Docker | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
- 'docs/**' | |
- 'screenshots/**' | |
- 'helm-chart/**' | |
- 'openshift_k8s/**' | |
branches: | |
- 'master' | |
workflow_dispatch: | |
jobs: | |
docker: | |
if: true # false to skip job during debug | |
strategy: | |
fail-fast: true | |
matrix: | |
image: ['-postgres', '-daemon', '-db-bootstrapper', '-webui'] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Version strings | |
id: version | |
run: | | |
echo "RELEASE_VERSION=$(echo "$GITHUB_REF_NAME#${GITHUB_SHA:0:6}")" >> $GITHUB_OUTPUT | |
echo "RELEASE_TIME=$(git show -s --format=%cI HEAD)" >> $GITHUB_OUTPUT | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Publish "latest" tag to Registry | |
if: ${{ !contains(github.ref_name, 'beta') }} | |
uses: elgohr/Publish-Docker-Github-Action@v5 | |
env: | |
GIT_HASH: ${{ steps.version.outputs.RELEASE_VERSION }} | |
GIT_TIME: ${{ steps.version.outputs.RELEASE_TIME }} | |
with: | |
name: cybertec/pgwatch2${{ matrix.image }} | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
dockerfile: docker/Dockerfile${{ matrix.image }} | |
buildargs: GIT_HASH,GIT_TIME | |
platforms: linux/amd64,linux/arm64 |