ci(docker): add autobuild dockerimages
This commit is contained in:
parent
2843373476
commit
7fd0c4bfa0
7 changed files with 48 additions and 4 deletions
34
.gitea/workflows/docker.yaml
Normal file
34
.gitea/workflows/docker.yaml
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
name: Build and Push Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main # Change this to your default branch if different
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build and Push Image
|
||||||
|
runs-on: ubuntu-latest-root # This specifies the environment for the job
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Login to Docker Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: gitea.haientus.duckdns.org # Replace with your Docker registry URL
|
||||||
|
username: ${{ gitea.actor }} # The actor who triggered the action
|
||||||
|
password: ${{ secrets.REGISTRY_TOKEN }} # Your registry token secret
|
||||||
|
|
||||||
|
- name: Build Docker Image
|
||||||
|
run: |
|
||||||
|
TODAY=$(date +'%Y-%m-%d')
|
||||||
|
docker build -t gitea.haientus.duckdns.org/vavakado/exmr:${TODAY} .
|
||||||
|
docker tag gitea.haientus.duckdns.org/vavakado/exmr:${TODAY} gitea.haientus.duckdns.org/vavakado/exmr:latest
|
||||||
|
|
||||||
|
- name: Push Docker Image
|
||||||
|
run: |
|
||||||
|
TODAY=$(date +'%Y-%m-%d')
|
||||||
|
docker push gitea.haientus.duckdns.org/vavakado/exmr:${TODAY}
|
||||||
|
docker push gitea.haientus.duckdns.org/vavakado/exmr:latest
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -39,6 +39,3 @@ exmr-*.tar
|
||||||
# In case you use Node.js/npm, you want to ignore these.
|
# In case you use Node.js/npm, you want to ignore these.
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
/assets/node_modules/
|
/assets/node_modules/
|
||||||
|
|
||||||
# ignore release artifacts
|
|
||||||
/rel/
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ RUN mkdir config
|
||||||
# to ensure any relevant config change will trigger the dependencies
|
# to ensure any relevant config change will trigger the dependencies
|
||||||
# to be re-compiled.
|
# to be re-compiled.
|
||||||
COPY config/config.exs config/${MIX_ENV}.exs config/
|
COPY config/config.exs config/${MIX_ENV}.exs config/
|
||||||
RUN mix deps.compile
|
RUN mix deps.compile --only $MIX_ENV
|
||||||
|
|
||||||
COPY priv priv
|
COPY priv priv
|
||||||
|
|
||||||
|
|
5
rel/overlays/bin/migrate
Executable file
5
rel/overlays/bin/migrate
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
cd -P -- "$(dirname -- "$0")"
|
||||||
|
exec ./exmr eval Exmr.Release.migrate
|
1
rel/overlays/bin/migrate.bat
Executable file
1
rel/overlays/bin/migrate.bat
Executable file
|
@ -0,0 +1 @@
|
||||||
|
call "%~dp0\exmr" eval Exmr.Release.migrate
|
5
rel/overlays/bin/server
Executable file
5
rel/overlays/bin/server
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
cd -P -- "$(dirname -- "$0")"
|
||||||
|
PHX_SERVER=true exec ./exmr start
|
2
rel/overlays/bin/server.bat
Executable file
2
rel/overlays/bin/server.bat
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
set PHX_SERVER=true
|
||||||
|
call "%~dp0\exmr" start
|
Loading…
Reference in a new issue