From f5c472899cb7058840a550d67d06231342deeacf Mon Sep 17 00:00:00 2001 From: Alie Date: Sun, 7 Jan 2024 12:54:46 +0100 Subject: [PATCH] push build action --- .gitea/workflows/build.yaml | 54 +++++++++++++++++++++++++++++++++++++ yarn.lock | 2 +- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/build.yaml diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..7bf7879 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,54 @@ +name: Test via test action and then build image +on: + push: + branches: + - main + - develop + +jobs: + unit-test: + steps: + - name: Run test job + uses: ./.gitea/workflow/test.yaml + build: + container: + image: node:16-buster-slim + needs: unit-test + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + # list of Docker images to use as base name for tags + images: | + fedi-image-bot/bot-api + git.fai.st/fedi-image-bot/bot-api + # generate Docker tags based on the following events/attributes + tags: | + type=schedule + type=ref,event=branch + type=ref,event=pr + type=sha + - name: Set up QEMU + # Add support for more platforms with QEMU (optional) + # https://github.com/docker/setup-qemu-action + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to fai.st docker registry + uses: docker/login-action@v3 + with: + registry: git.fai.st + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PASS }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=registry,ref=fedi-image-bot/bot-api:latest + cache-to: type=inline \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index fd8bf2f..c99fdb5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1,6 +1,6 @@ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 -# bun ./bun.lockb --hash: 3F45CED80FCAB4BB-3395ac5a537bfe37-601C6F1D91E66F40-076ab920e8127532 +# bun ./bun.lockb --hash: 33E2AFF8D14D8AA5-eebd7db9b471377f-95D45A5384DAAEBC-8f83c3f6d7ba1359 "@ampproject/remapping@^2.2.0":