Compare commits
11 Commits
revert-alp
...
update-par
| Author | SHA1 | Date | |
|---|---|---|---|
| ca0fc49830 | |||
| 5873412a9f | |||
|
|
6a9aef07db | ||
|
|
21ebb45089 | ||
| d9c7cb6963 | |||
| 870672d19b | |||
|
|
ca7ae870e8 | ||
|
|
69b0417d03 | ||
| 99c80d7737 | |||
| bc53f36260 | |||
| caa9280236 |
52
.github/workflows/actions.yml
vendored
52
.github/workflows/actions.yml
vendored
@@ -3,21 +3,16 @@ name: Docker Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- main # Set a branch to deploy
|
||||
|
||||
env:
|
||||
IMAGE_REGISTRY: ghcr.io
|
||||
TOKEN_USER: HotaruBlaze
|
||||
IMAGE_OWNER: fluttershub
|
||||
IMAGE_NAME: homepage
|
||||
|
||||
jobs:
|
||||
BuildImage:
|
||||
Build_x86:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
CPU_ARCH:
|
||||
- arm64
|
||||
- x86_64
|
||||
# If running with act, Uncomment below
|
||||
# container: phaze9/action-runner
|
||||
env:
|
||||
@@ -25,46 +20,59 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Available platforms
|
||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||
|
||||
- name: Login to ghcr.io
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ${{ env.IMAGE_REGISTRY }}
|
||||
username: ${{ env.TOKEN_USER }}
|
||||
password: ${{ secrets.TOKEN }}
|
||||
username: ${{ env.IMAGE_OWNER }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push - x64
|
||||
- name: Build Docker Image
|
||||
id: docker_build_x64
|
||||
uses: docker/build-push-action@v2
|
||||
if: ${{ matrix.CPU_ARCH == 'x86_64'}}
|
||||
with:
|
||||
push: true
|
||||
platforms: linux/amd64
|
||||
labels: org.opencontainers.image.source https://github.com/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}
|
||||
tags: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:x64-latest
|
||||
|
||||
- name: Build and push - arm64
|
||||
Build_ARM64:
|
||||
runs-on: [self-hosted, linux, ARM64]
|
||||
# If running with act, Uncomment below
|
||||
# container: phaze9/action-runner
|
||||
env:
|
||||
DOCKER_CONFIG: $HOME/.docker
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to ghcr.io
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ${{ env.IMAGE_REGISTRY }}
|
||||
username: ${{ env.IMAGE_OWNER }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build Docker Image
|
||||
id: docker_build_arm64
|
||||
uses: docker/build-push-action@v2
|
||||
if: ${{ matrix.CPU_ARCH == 'arm64'}}
|
||||
with:
|
||||
push: true
|
||||
platforms: linux/arm64
|
||||
labels: org.opencontainers.image.source https://github.com/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}
|
||||
tags: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:arm-latest
|
||||
tags: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:arm64-latest
|
||||
|
||||
|
||||
Deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: BuildImage
|
||||
needs: Build_ARM64
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run Ansible playbook
|
||||
|
||||
2
.github/workflows/snyk-container.yml
vendored
2
.github/workflows/snyk-container.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
# Snyk can be used to break the build when it detects vulnerabilities.
|
||||
# In this case we want to upload the issues to GitHub Code Scanning
|
||||
continue-on-error: true
|
||||
uses: snyk/actions/docker@14818c4695ecc4045f33c9cee9e795a788711ca4
|
||||
uses: snyk/actions/docker@master
|
||||
env:
|
||||
# In order to use the Snyk Action you will need to have a Snyk API token.
|
||||
# More details in https://github.com/snyk/actions#getting-your-snyk-token
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM node:18-alpine AS base
|
||||
FROM node:18.4.0 AS base
|
||||
LABEL version="4.1.0"
|
||||
LABEL description=""
|
||||
|
||||
@@ -7,14 +7,11 @@ COPY ["package.json", "./"]
|
||||
COPY ["yarn.lock", "./"]
|
||||
|
||||
FROM base AS builder
|
||||
RUN apk add --no-cache --virtual .gyp python3 make g++ \
|
||||
&& yarn install \
|
||||
&& apk del .gyp
|
||||
|
||||
RUN yarn install
|
||||
COPY ["src/", "./src"]
|
||||
RUN npm run Prod
|
||||
|
||||
FROM nginx:1.21.6-alpine as Web
|
||||
FROM nginx:1.23.0-alpine as Web
|
||||
LABEL maintainer="Phoenix (https://github.com/HotaruBlaze)"
|
||||
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
||||
COPY docker/web.conf /etc/nginx/conf.d/web.conf
|
||||
|
||||
@@ -2,7 +2,7 @@ version: "3"
|
||||
|
||||
services:
|
||||
fluttershub.com:
|
||||
image: ghcr.io/fluttershub/homepage:x64-latest
|
||||
image: ghcr.io/fluttershub/homepage:arm64-latest
|
||||
restart: always
|
||||
networks:
|
||||
- external
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
"Prod": "npm run Cleanup && npm run Init && parcel build src/index.pug --dist-dir build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"parcel": "^2.5.0"
|
||||
"@parcel/transformer-pug": "2.6.2",
|
||||
"@parcel/transformer-sass": "2.6.2",
|
||||
"parcel": "^2.6.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.*"
|
||||
|
||||
Reference in New Issue
Block a user