@@ -0,0 +1,29 @@ | |||||
name: deploy-containers | |||||
on: | |||||
push: | |||||
paths: | |||||
- 'containers/**' | |||||
jobs: | |||||
test-containers: | |||||
runs-on: ubuntu-latest | |||||
steps: | |||||
- uses: actions/checkout@v2 | |||||
- name: test containers | |||||
run: | | |||||
cd container | |||||
./test | |||||
deploy-containers: | |||||
runs-on: ubuntu-latest | |||||
needs: test-containers | |||||
steps: | |||||
- uses: actions/checkout@v2 | |||||
- name: deploy containers | |||||
run: | | |||||
cd containers | |||||
./deploy | |||||
env: | |||||
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} | |||||
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} |
@@ -0,0 +1,29 @@ | |||||
name: deploy-packages | |||||
on: | |||||
push: | |||||
paths: | |||||
- 'packages/**' | |||||
jobs: | |||||
test-packages: | |||||
runs-on: ubuntu-latest | |||||
steps: | |||||
- uses: actions/checkout@v2 | |||||
- name: test packages | |||||
run: | | |||||
yarn install | |||||
yarn test | |||||
deploy-packages: | |||||
runs-on: ubuntu-latest | |||||
needs: test-packages | |||||
steps: | |||||
- uses: actions/checkout@v2 | |||||
- name: deploy packages | |||||
run: | | |||||
cd packages | |||||
./deploy | |||||
continue-on-error: true | |||||
env: | |||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
@@ -1,43 +0,0 @@ | |||||
name: deploy | |||||
on: | |||||
push: | |||||
tags: | |||||
- '*' | |||||
jobs: | |||||
deploy-containers: | |||||
runs-on: ubuntu-latest | |||||
steps: | |||||
- uses: actions/checkout@v2 | |||||
- name: deploy containers | |||||
run: | | |||||
./bin/deploy_containers | |||||
env: | |||||
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} | |||||
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} | |||||
deploy-node-modules: | |||||
runs-on: ubuntu-latest | |||||
steps: | |||||
- uses: actions/checkout@v2 | |||||
- name: deploy node modules | |||||
run: | | |||||
./bin/deploy_node_modules | |||||
env: | |||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |||||
deploy-web-extensions: | |||||
runs-on: ubuntu-latest | |||||
steps: | |||||
- uses: actions/checkout@v2 | |||||
- name: deploy web extensions | |||||
run: | | |||||
./bin/deploy_web_extensions | |||||
env: | |||||
EXTENSION_ID: ${{ secrets.EXTENSION_ID }} | |||||
CLIENT_ID: ${{ secrets.CLIENT_ID }} | |||||
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | |||||
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} | |||||
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }} | |||||
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }} |
@@ -51,3 +51,12 @@ jobs: | |||||
python -m pip install --upgrade pip | python -m pip install --upgrade pip | ||||
python -m pip install -r requirements.txt | python -m pip install -r requirements.txt | ||||
python manage.py test | python manage.py test | ||||
test-containers: | |||||
runs-on: ubuntu-latest | |||||
steps: | |||||
- uses: actions/checkout@v2 | |||||
- name: test containers | |||||
run: | | |||||
cd container | |||||
./test |
@@ -16,12 +16,10 @@ set -o pipefail | |||||
set -o nounset | set -o nounset | ||||
function build_and_push_container { | function build_and_push_container { | ||||
pushd containers | |||||
container=$1 | container=$1 | ||||
docker build --tag lesspass/${container} ./${container} | docker build --tag lesspass/${container} ./${container} | ||||
docker tag lesspass/${container} quay.io/lesspass/${container} | docker tag lesspass/${container} quay.io/lesspass/${container} | ||||
docker push quay.io/lesspass/${container} | docker push quay.io/lesspass/${container} | ||||
popd | |||||
} | } | ||||
function build_and_push_containers { | function build_and_push_containers { | ||||
@@ -29,6 +27,7 @@ function build_and_push_containers { | |||||
build_and_push_container webserver | build_and_push_container webserver | ||||
build_and_push_container backend | build_and_push_container backend | ||||
build_and_push_container frontend | build_and_push_container frontend | ||||
build_and_push_container blog | |||||
} | } | ||||
build_and_push_containers | build_and_push_containers |
@@ -21,7 +21,7 @@ function push_packages_on_npm { | |||||
projects="lesspass lesspass-crypto lesspass-entropy lesspass-fingerprint lesspass-pure lesspass-render-password" | projects="lesspass lesspass-crypto lesspass-entropy lesspass-fingerprint lesspass-pure lesspass-render-password" | ||||
for project in ${projects} | for project in ${projects} | ||||
do | do | ||||
pushd packages/${project} | |||||
pushd ${project} | |||||
yarn publish --non-interactive | yarn publish --non-interactive | ||||
popd | popd | ||||
done | done |