diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9d0e184..f4d3239 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,33 +1,20 @@ name: Release -on: +on: push: branches: - - main + - 'main' jobs: - changelog: + release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Conventional Changelog Action - id: changelog - uses: TriPSs/conventional-changelog-action@v3.7.1 - with: - github-token: ${{ secrets.CHANGELOG_RELEASE }} - git-message: 'chore(release): {version}' - git-user-name: 'krr0ption' - git-user-email: 'info@mardin.cc' - preset: 'angular' - tag-prefix: 'v' + - name: Check out code + uses: actions/checkout@v2 - - name: Create release - uses: actions/create-release@v1 - if: ${{ steps.changelog.outputs.skipped == 'false' }} - env: - GITHUB_TOKEN: ${{ secrets.CHANGELOG_RELEASE }} + - name: Release with release-please + uses: google-github-actions/release-please-action@v2 with: - tag_name: ${{ steps.changelog.outputs.tag }} - release_name: ${{ steps.changelog.outputs.tag }} - body: ${{ steps.changelog.outputs.clean_changelog }} + release-type: simple + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/Dockerfile b/Dockerfile index 220ff49..87f7d17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ -# Stage 1: Build Stage -FROM python:3.10-slim AS build +FROM python:3.10-slim ENV PYTHONUNBUFFERED 1 @@ -7,32 +6,13 @@ WORKDIR /app COPY . /app -RUN apt-get update -y --quiet \ - && apt-get install -y --no-install-recommends \ - nodejs \ - npm \ - make \ - gcc \ - g++ \ - python3-dev \ +RUN apt-get update -y \ + && apt-get install nodejs npm make gcc g++ python3-dev -y --no-install-recommends \ && make dashboard-build \ - && pip install --no-cache-dir --upgrade -r /app/requirements.txt \ - && make dashboard-cleanup - -# Stage 2: Runtime Stage -FROM python:3.10-slim - -ENV PYTHONUNBUFFERED 1 - -WORKDIR /app - -COPY --from=build /app /app - -RUN apt-get update -y --quiet \ - && apt-get install -y --no-install-recommends \ - nodejs \ + && pip install --no-cache-dir -r /app/requirements.txt \ && apt-get clean -y \ - && apt-get autoremove -y \ - && rm -rf /var/lib/apt/lists/* + && apt-get autoremove g++ npm nodejs gcc python3-dev -y \ + && make dashboard-cleanup \ + && rm -rf /var/lib/apt/lists/* CMD ["make", "start"]