mirror of
https://github.com/Metastem/wikiless
synced 2024-12-06 19:16:58 +01:00
Merge pull request #10 from pauvos/buildx
Proposal: Let's provide container images
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
.git*
|
||||
docker-compose.yml
|
||||
@@ -0,0 +1,51 @@
|
||||
name: Build docker image
|
||||
|
||||
on:
|
||||
# Runs on pushes targeting the default branch
|
||||
push:
|
||||
branches: ["buildx","buildx-semver", "main"] # replace with ["main"]
|
||||
tags: ['*']
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Container Registry
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Generate Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: |
|
||||
ghcr.io/${{ github.repository }}
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
flavor: |
|
||||
latest=true
|
||||
- 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@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
+1
-2
@@ -1,7 +1,6 @@
|
||||
FROM node:16-alpine
|
||||
RUN apk add git
|
||||
RUN git clone https://github.com/Metastem/wikiless.git
|
||||
WORKDIR /wikiless
|
||||
COPY . /wikiless
|
||||
RUN npm install --no-optional
|
||||
COPY config.js.template config.js
|
||||
CMD npm start
|
||||
|
||||
Reference in New Issue
Block a user