v1.0.0 #28

Merged
bizcochito merged 147 commits from develop into main 2024-01-14 19:49:34 +00:00
2 changed files with 6 additions and 81 deletions
Showing only changes of commit 7a607e129c - Show all commits

View File

@ -1,79 +0,0 @@
name: Test and build image
on:
push:
branches:
- main
- develop
jobs:
unit-test:
container:
image: docker:dind
volumes:
- /usr/local/share/.cache/yarn:/usr/local/share/.cache/yarn
- /var/lib/docker/image:/var/lib/docker/image
- /var/lib/docker/overlay2:/var/lib/docker/overlay2
- /var/lib/docker/buildkit:/var/lib/docker/buildkit
steps:
- name: Starting docker daemon
run: docker-init -- dockerd --host=unix:///var/run/docker.sock &
- name: Installing necessary packages
run: apk add yarn git curl bash
- name: Check out repository code
uses: actions/checkout@v3
- name: Install project dependencies
run: yarn install --frozen-lockfile --ignore-scripts
- name: Run docker-compose
run: docker compose down -v && docker compose run bot-api bun test
build:
container:
image: docker:dind
volumes:
- /data/.cache/act:/data/.cache/act
- /var/lib/docker/image:/var/lib/docker/image
- /var/lib/docker/overlay2:/var/lib/docker/overlay2
- /var/lib/docker/buildkit:/var/lib/docker/buildkit
needs: unit-test
steps:
- name: Starting docker daemon
run: docker-init -- dockerd --host=unix:///var/run/docker.sock &
- name: Installing necessary packages
run: apk add nodejs git curl bash
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: https://github.com/docker/metadata-action@v4
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@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to fai.st docker registry
uses: docker/login-action@v2
with:
registry: git.fai.st
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Build and push
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64
context: .
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

View File

@ -1,5 +1,10 @@
name: Unit Tests with docker compose
on: [pull_request]
on:
pull_request:
push:
branches:
- main
- develop
jobs:
unit-test:
@ -9,7 +14,6 @@ jobs:
- /usr/local/share/.cache/yarn:/usr/local/share/.cache/yarn
- /var/lib/docker/image:/var/lib/docker/image
- /var/lib/docker/overlay2:/var/lib/docker/overlay2
- /var/lib/docker/buildkit:/var/lib/docker/buildkit
steps:
- name: Starting docker daemon
run: docker-init -- dockerd --host=unix:///var/run/docker.sock &