update drone config

This commit is contained in:
shibao 2022-07-30 16:24:21 -04:00
parent df0d81e322
commit 2e1f850c7e

View File

@ -16,21 +16,29 @@ steps:
- assets/node_modules/ - assets/node_modules/
- name: test - name: test
image: bitwalker/alpine-elixir-phoenix:1.13 image: elixir:1.13.4-alpine
environment: environment:
TEST_DATABASE_URL: ecto://postgres:postgres@database/memex_test TEST_DATABASE_URL: ecto://postgres:postgres@database/memex_test
HOST: testing.example.tld HOST: testing.example.tld
commands: commands:
- apk add --no-cache build-base npm git python3
- mix local.rebar --force - mix local.rebar --force
- mix local.hex --force - mix local.hex --force
- mix deps.get - mix deps.get
- npm install --prefix assets - mix deps.compile
- npm --prefix ./assets ci --progress=false --no-audit --loglevel=error
- npm run --prefix ./assets deploy
- mix do phx.digest, gettext.extract
- mix test - mix test
- name: build and publish stable - name: build and publish stable
image: plugins/docker image: thegeeklab/drone-docker-buildx
privileged: true
settings: settings:
repo: shibaobun/memex repo: shibaobun/memex
purge: true
compress: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
username: username:
from_secret: docker_username from_secret: docker_username
password: password:
@ -41,9 +49,13 @@ steps:
- stable - stable
- name: build and publish tagged version - name: build and publish tagged version
image: plugins/docker image: thegeeklab/drone-docker-buildx
privileged: true
settings: settings:
repo: shibaobun/memex repo: shibaobun/memex
purge: true
compress: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
username: username:
from_secret: docker_username from_secret: docker_username
password: password:
@ -77,7 +89,7 @@ services:
volumes: volumes:
- name: cache - name: cache
host: host:
path: /tmp/drone-cache path: /run/media/default/ssdsrv/gitea/drone-cache
- name: docker_sock - name: docker_sock
host: host:
path: /var/run/docker.sock path: /var/run/docker.sock