Skip to content

fix(app): fix problem when using SSL proxy #11

fix(app): fix problem when using SSL proxy

fix(app): fix problem when using SSL proxy #11

Workflow file for this run

name: Release
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
env:
VERSION: ${{ github.ref_name }}
IMG_NAME_DOCKER: mthalmann/securedav
permissions:
contents: write # to create release
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
concurrency:
group: 'release'
cancel-in-progress: false
jobs:
build_release:
name: Build release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate changelog
run: |
npm i -g conventional-changelog-cli@^3.0.0
conventional-changelog -p angular -o CHANGELOG.md -r 2
tail -n +2 CHANGELOG.md > CHANGELOG #remove first line
sed -i -e '/./,$!d' -e :a -e '/^\n*$/{$d;N;ba' -e '}' CHANGELOG #trim empty lines
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: ctype, curl, dom, fileinfo, filter, hash, json, libxml, mbstring, openssl, pcre, phar, session, tokenizer, xml, xmlwriter
ini-values: error_reporting=E_ALL
tools: composer:v2
- name: Install PHP dependencies
run: composer install --no-interaction --no-progress --prefer-dist --optimize-autoloader --no-dev
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Build client
run: |
npm ci
npm run build
mv node_modules .node_modules
- name: Bundle release
run: |
mkdir -p ../release/securedav
cp -r * ../release/securedav
cp .env.example ../release/securedav/.env.example
cp .dockerignore ../release/securedav/.dockerignore
mv .node_modules node_modules
cd ../release/securedav
rm -rf tests phpunit.xml
rm -rf `find . -name '.git*'`
cd ..
zip -r ../SecureDAV/SecureDAV-${{ env.VERSION }}.zip *
- name: Release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: SecureDAV v${{ env.VERSION }}
tag_name: ${{ env.VERSION }}
body_path: CHANGELOG
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload release artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./SecureDAV-${{ env.VERSION }}.zip
asset_name: SecureDAV-${{ env.VERSION }}.zip
asset_content_type: application/zip
- name: Build docs
run: |
echo ${{ env.VERSION }} > ./docs/.vuepress/version.txt
npm run docs:build
echo "" > ./docs/.vuepress/dist/.nojekyll
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload docs artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./docs/.vuepress/dist
deploy_docs:
name: Deploy documentation
runs-on: ubuntu-latest
needs: build_release
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
build_docker:
name: Build & push docker image
runs-on: ubuntu-latest
needs: deploy_docs
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMG_NAME_DOCKER }}
tags: |
type=semver,pattern={{version}}
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}