Skip to content

Commit

Permalink
[+] provide ARM docker images, closes #502 (#534)
Browse files Browse the repository at this point in the history
[+] provide ARM docker images, closes #502
  • Loading branch information
pashagolub committed Nov 24, 2022
1 parent cd2790d commit 17fa1b1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Expand Up @@ -21,6 +21,12 @@ jobs:
echo "PR_TIME=$(git show -s --format=%cI HEAD)" >> $GITHUB_OUTPUT
echo "PR_TAGNAME"=$(echo $GITHUB_REF_NAME | tr // _) >> $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 test version to Registry
uses: elgohr/Publish-Docker-Github-Action@v4
env:
Expand All @@ -33,4 +39,5 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: docker/Dockerfile-postgres
buildargs: GIT_HASH,GIT_TIME
tags: ${{ steps.version.outputs.PR_TAGNAME }}
tags: ${{ steps.version.outputs.PR_TAGNAME }}
platforms: linux/amd64,linux/arm64
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Expand Up @@ -46,6 +46,12 @@ jobs:
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 beta version to Registry
if: ${{ contains(github.ref_name, 'beta') }}
uses: elgohr/Publish-Docker-Github-Action@v4
Expand All @@ -59,6 +65,7 @@ jobs:
dockerfile: docker/Dockerfile${{ matrix.image }}
buildargs: GIT_HASH,GIT_TIME
tags: ${{ github.ref_name }}
platforms: linux/amd64,linux/arm64

- name: Publish "latest" tag to Registry
if: ${{ !contains(github.ref_name, 'beta') }}
Expand All @@ -73,6 +80,7 @@ jobs:
dockerfile: docker/Dockerfile${{ matrix.image }}
buildargs: GIT_HASH,GIT_TIME
tags: "latest"
platforms: linux/amd64,linux/arm64

- name: Publish "X.X.X, X.X, X" tags to Registry
if: ${{ !contains(github.ref_name, 'beta') }}
Expand All @@ -86,4 +94,5 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: docker/Dockerfile${{ matrix.image }}
buildargs: GIT_HASH,GIT_TIME
tag_semver: true
tag_semver: true
platforms: linux/amd64,linux/arm64
3 changes: 2 additions & 1 deletion docker/Dockerfile-postgres
Expand Up @@ -22,7 +22,8 @@ RUN apt-get -q update && DEBIAN_FRONTEND=noninteractive apt-get install -qy curl
&& pg_dropcluster 11 main ; pg_createcluster --locale en_US.UTF-8 11 main \
&& echo "include = 'pgwatch_postgresql.conf'" >> /etc/postgresql/11/main/postgresql.conf

RUN wget -q -O grafana.deb https://dl.grafana.com/oss/release/grafana_8.3.4_amd64.deb \
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) \
&& wget -q -O grafana.deb "https://dl.grafana.com/oss/release/grafana_8.3.4_${arch}.deb" \
&& dpkg -i grafana.deb && rm grafana.deb


Expand Down

0 comments on commit 17fa1b1

Please sign in to comment.