From 08011bb5d8213cca25bce893d3af9338717f77b5 Mon Sep 17 00:00:00 2001 From: RouxAntoine Date: Sat, 19 Aug 2023 18:15:53 +0200 Subject: [PATCH] feature: migrate to container.localdomain and add actions workflow to build --- .github/workflows/main.yaml | 39 +++++++++++++++++++++++++++++++++++++ Makefile | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..289f697 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,39 @@ +name: Main + +on: + push: + branches: + - master + +env: + REGISTRY_NAME: container.localdomain:5000 + +jobs: + build: + runs-on: docker + container: + image: catthehacker/ubuntu:act-22.04 + steps: + - uses: RouxAntoine/checkout@v3.5.4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2.9.1 + with: + config-inline: | + [registry."${{ env.REGISTRY_NAME }}"] + http = true + + - name: Build and push + uses: docker/build-push-action@v4 + env: + ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119 + with: + context: . + push: true + tags: ${{ env.REGISTRY_NAME }}/postgres:latest + platforms: | + linux/arm/v6 + linux/amd64 diff --git a/Makefile b/Makefile index 2ca3bbc..f0cf23e 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY: imagePostgres -REGISTRY_IP=docker.registry +REGISTRY_IP=container.localdomain # linux/arm/v7 # linux/arm/v6 # linux/arm64