Skip to content
This repository has been archived by the owner on Jul 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #113 from SkywardAI/feat/arm64
Browse files Browse the repository at this point in the history
Support arm64
  • Loading branch information
Aisuko authored Jul 1, 2024
2 parents 6b6f11a + 7fa9eda commit ba2bde6
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.gitignore
.git/
5 changes: 2 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
interval: "monthly"
open-pull-requests-limit: 10
reviewers:
- Wen-ace

68 changes: 59 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,21 @@ on:
branches:
- 'main'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
name: 'Build 🏗️'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4

- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup Nodes
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install dependencies
Expand All @@ -37,22 +44,65 @@ jobs:
docker_operations:
name: 'Docker Build and Push🐳'
runs-on: ubuntu-latest
needs: build
needs: [build]
strategy:
matrix:
config:
- { dockerfile: "Dockerfile", platforms: "linux/amd64,linux/arm64" }

steps:
- uses: actions/checkout@v4

- name: Check repo
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Github Container Registry
uses: docker/login-action@v3
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get Commit Hash
id: commit
shell: bash
run: |
echo "SHORT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
- name: Get Tag Name
id: tag
shell: bash
run: |
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Build Docker image
if: startsWith(github.ref, 'refs/tags/') != true && success()
run: |
docker build -t ghcr.io/${{ secrets.NAMESPACE }}/${{ secrets.IMAGE_NAME }}:${GITHUB_SHA::7} .
uses: docker/build-push-action@v4
with:
context: .
push: false
platforms: ${{ matrix.config.platforms }}
tags: "ghcr.io/${{ secrets.NAMESPACE }}/${{ secrets.IMAGE_NAME }}:${{ env.SHORT_HASH }}"
file: ${{ matrix.config.dockerfile }}

# run: |
# docker build -t ghcr.io/${{ secrets.NAMESPACE }}/${{ secrets.IMAGE_NAME }}:${GITHUB_SHA::7} .
- name: Push Docker image
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
run: |
docker build -t ghcr.io/${{ secrets.NAMESPACE }}/${{ secrets.IMAGE_NAME }}:${GITHUB_REF/refs\/tags\//} .
docker push ghcr.io/${{ secrets.NAMESPACE }}/${{ secrets.IMAGE_NAME }}:${GITHUB_REF/refs\/tags\//}
uses: docker/build-push-action@v4
with:
context: .
push: true
platforms: ${{ matrix.config.platforms }}
tags: "ghcr.io/${{ secrets.NAMESPACE }}/${{ secrets.IMAGE_NAME }}:${{ env.TAG }}"
file: ${{ matrix.config.dockerfile }}

# run: |
# docker build -t ghcr.io/${{ secrets.NAMESPACE }}/${{ secrets.IMAGE_NAME }}:${GITHUB_REF/refs\/tags\//} .
# docker push ghcr.io/${{ secrets.NAMESPACE }}/${{ secrets.IMAGE_NAME }}:${GITHUB_REF/refs\/tags\//}
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
with:
config-name: release-drafter.yml
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Rebel

[![Release Drafter 🚀](https://github.com/SkywardAI/chat-frontend/actions/workflows/release-drafter.yml/badge.svg)](https://github.com/SkywardAI/chat-frontend/actions/workflows/release-drafter.yml)
Frontend for AI-pilot chatbot

# Nuxt 3 Minimal Starter
[![Rebel CI/CD 🚀](https://github.com/SkywardAI/chat-frontend/actions/workflows/ci.yml/badge.svg)](https://github.com/SkywardAI/chat-frontend/actions/workflows/ci.yml) [![Release Drafter 🚀](https://github.com/SkywardAI/chat-frontend/actions/workflows/release-drafter.yml/badge.svg)](https://github.com/SkywardAI/chat-frontend/actions/workflows/release-drafter.yml)

Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.

## Setup

Expand Down

0 comments on commit ba2bde6

Please sign in to comment.