Skip to content

Commit

Permalink
Build x86-64, arm64 & arm32 Docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitallyRefined committed Aug 5, 2023
1 parent 9ea6fa6 commit ce47c49
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 8 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,31 @@ jobs:
docker pull ubuntu:jammy
docker images --format '{{.ID}}' ubuntu:jammy > .github/docker-image-built-against
- name: Build and push
uses: mr-smithers-excellent/docker-build-push@v6
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@15c905b16b06416d2086efa066dd8e3a35cc7f98
with:
driver-opts: 'image=moby/buildkit:v0.10.5'

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
image: docker-wireguard-tunnel
tags: v2, latest
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
ghcr.io/digitallyrefined/docker-wireguard-tunnel:latest
ghcr.io/digitallyrefined/docker-wireguard-tunnel:v2
- name: Commit and push changes
uses: actions-js/push@master
with:
Expand Down
27 changes: 23 additions & 4 deletions .github/workflows/check-for-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,35 @@ jobs:
set -x
echo "needs-updating=`[[ $pkgs_to_update ]] && echo true || echo false`" >>$GITHUB_OUTPUT
- name: Build and push
uses: mr-smithers-excellent/docker-build-push@v6
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
if: steps.image-update.outputs.needs-updating == 'true' || steps.pkg-update.outputs.needs-updating == 'true'

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@15c905b16b06416d2086efa066dd8e3a35cc7f98
with:
driver-opts: 'image=moby/buildkit:v0.10.5'
if: steps.image-update.outputs.needs-updating == 'true' || steps.pkg-update.outputs.needs-updating == 'true'

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
image: docker-wireguard-tunnel
tags: v2, latest
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_TOKEN }}
if: steps.image-update.outputs.needs-updating == 'true' || steps.pkg-update.outputs.needs-updating == 'true'

- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
ghcr.io/digitallyrefined/docker-wireguard-tunnel:latest
ghcr.io/digitallyrefined/docker-wireguard-tunnel:v2
if: steps.image-update.outputs.needs-updating == 'true' || steps.pkg-update.outputs.needs-updating == 'true'

- name: Commit and push changes
uses: actions-js/push@master
with:
Expand Down

0 comments on commit ce47c49

Please sign in to comment.