From aaf055ddaa48d9005df8fdc407c11c431e3e547b Mon Sep 17 00:00:00 2001 From: Luna Simons Date: Thu, 21 Sep 2023 10:24:45 +0200 Subject: [PATCH] ci: readd workflows --- .github/workflows/docker-cd.yaml | 31 +++++++++++++++++++++++++++++++ .github/workflows/node-ci.yaml | 18 ++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .github/workflows/docker-cd.yaml create mode 100644 .github/workflows/node-ci.yaml diff --git a/.github/workflows/docker-cd.yaml b/.github/workflows/docker-cd.yaml new file mode 100644 index 0000000..c90d2db --- /dev/null +++ b/.github/workflows/docker-cd.yaml @@ -0,0 +1,31 @@ +name: Docker CD +on: + push: + tags: + - "v*" +jobs: + docker-build-and-push: + name: Build Docker image and push + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Extract tag + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + push: true + platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/untis-ics-sync:${{ env.RELEASE_VERSION }},${{ secrets.DOCKER_HUB_USERNAME }}/untis-ics-sync:latest diff --git a/.github/workflows/node-ci.yaml b/.github/workflows/node-ci.yaml new file mode 100644 index 0000000..aebeed2 --- /dev/null +++ b/.github/workflows/node-ci.yaml @@ -0,0 +1,18 @@ +name: Node CI +on: [push, pull_request] +jobs: + node-build: + name: Install, lint, build and test + strategy: + matrix: + node-version: [14.x, 16.x, 18.x] + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{matrix.os}} + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: ${{matrix.node-version}} + - run: yarn install + - run: yarn lint + - run: yarn build