Compare commits
1 Commits
v0.0.6
...
94dbbc7743
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94dbbc7743 |
@@ -1,13 +1,13 @@
|
||||
name: Build & Push
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
CHART_PATH: web/charts/factorio-signal-exporter
|
||||
REGISTRY: git.sebse.de
|
||||
IMAGE: git.sebse.de/sebse/factorio-signal-exporter
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -17,24 +17,17 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Bump version
|
||||
id: version
|
||||
uses: https://git.sebse.de/sebse/actions/version-bump@v1
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v4
|
||||
|
||||
- name: Log in to Gitea Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
token: ${{ github.token }}
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ secrets.GITEA_USERNAME }}
|
||||
password: ${{ secrets.GITEA_TOKEN }}
|
||||
|
||||
- name: Set env vars
|
||||
run: |
|
||||
echo "IMAGE=git.sebse.de/${{ github.repository }}" >> $GITHUB_ENV
|
||||
echo "IMAGE_MIGRATE=git.sebse.de/${{ github.repository }}-migrate" >> $GITHUB_ENV
|
||||
|
||||
- name: Docker login
|
||||
uses: https://git.sebse.de/sebse/actions/docker-login@v1
|
||||
with:
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Extract metadata (app)
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
@@ -42,57 +35,29 @@ jobs:
|
||||
tags: |
|
||||
type=sha,prefix=,format=short
|
||||
type=raw,value=latest
|
||||
type=raw,value=${{ steps.version.outputs.version }}
|
||||
|
||||
- name: Build and push app
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./web
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=registry,ref=${{ env.IMAGE }}:latest
|
||||
cache-to: type=inline
|
||||
|
||||
- name: Extract metadata (migrate)
|
||||
id: meta-migrate
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.IMAGE_MIGRATE }}
|
||||
tags: |
|
||||
type=sha,prefix=,format=short
|
||||
type=raw,value=latest
|
||||
type=raw,value=${{ steps.version.outputs.version }}
|
||||
- name: Package Helm chart
|
||||
run: |
|
||||
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
|
||||
helm package web/charts/factorio-signal-exporter \
|
||||
--version "0.0.0-${SHORT_SHA}" \
|
||||
--app-version "${SHORT_SHA}"
|
||||
|
||||
- name: Build and push migrate
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./web
|
||||
file: ./web/Dockerfile.migrate
|
||||
push: true
|
||||
tags: ${{ steps.meta-migrate.outputs.tags }}
|
||||
cache-from: type=registry,ref=${{ env.IMAGE_MIGRATE }}:latest
|
||||
cache-to: type=inline
|
||||
|
||||
- name: Package and push helm chart
|
||||
uses: https://git.sebse.de/sebse/actions/helm-package-push@v1
|
||||
with:
|
||||
chart-path: ${{ env.CHART_PATH }}
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
app-version: ${{ steps.version.outputs.version }}
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Package and push Factorio mod
|
||||
uses: https://git.sebse.de/sebse/actions/factorio-mod-push@v1
|
||||
with:
|
||||
mod-folder: ./plugin
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
factorio-token: ${{ secrets.FACTORIO_TOKEN }}
|
||||
|
||||
- name: Deploy to prod
|
||||
uses: https://git.sebse.de/sebse/actions/helm-deploy@v1
|
||||
with:
|
||||
app: factorio-signal-exporter
|
||||
profile: prod
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
ssh-key: ${{ secrets.HELMBOT_SSH_KEY }}
|
||||
- name: Push Helm chart to Gitea
|
||||
run: |
|
||||
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
|
||||
curl -u ${{ secrets.GITEA_USERNAME }}:${{ secrets.GITEA_TOKEN }} \
|
||||
-X POST \
|
||||
https://${{ env.REGISTRY }}/api/packages/sebse/helm/api/charts \
|
||||
-F "chart=@factorio-signal-exporter-0.0.0-${SHORT_SHA}.tgz" \
|
||||
--fail-with-body
|
||||
1126
n8n/Factorio Item Import.json
Normal file
1126
n8n/Factorio Item Import.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,3 +0,0 @@
|
||||
# Signal Exporter
|
||||
|
||||
Provides a custom combinator that reads both connected circuit and logistic networks, writing the data to a JSON file.
|
||||
@@ -1,10 +0,0 @@
|
||||
FROM node:24-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN npm ci
|
||||
|
||||
COPY migrations/ ./migrations/
|
||||
|
||||
CMD ["npm", "run", "migrate"]
|
||||
@@ -9,12 +9,10 @@ spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "factorio-signal-exporter.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "factorio-signal-exporter.selectorLabels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: app
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
@@ -23,8 +21,9 @@ spec:
|
||||
{{- end }}
|
||||
initContainers:
|
||||
- name: migrate
|
||||
image: {{ .Values.initImage.repository }}:{{ .Values.initImage.tag }}
|
||||
imagePullPolicy: {{ .Values.initImage.pullPolicy }}
|
||||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command: ["npm", "run", "migrate"]
|
||||
env:
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
|
||||
@@ -8,7 +8,6 @@ spec:
|
||||
type: {{ .Values.service.type }}
|
||||
selector:
|
||||
{{- include "factorio-signal-exporter.selectorLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: app
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: 3000
|
||||
@@ -1,12 +1,7 @@
|
||||
image:
|
||||
repository: git.sebse.de/sebse/factorio-signal-exporter
|
||||
tag: latest
|
||||
pullPolicy: Always
|
||||
|
||||
initImage:
|
||||
repository: git.sebse.de/sebse/factorio-signal-exporter-migrate
|
||||
tag: latest
|
||||
pullPolicy: Always
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
imagePullSecrets: []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user