Skip to content

Commit 84d3cf9

Browse files
authored
feature/review trigger security (#88)
1 parent c5cdf54 commit 84d3cf9

8 files changed

Lines changed: 25 additions & 14 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
88
ARG NODE_VERSION="none"
99
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
1010

11-
COPY requirements.txt constraints.txt /tmp/pip-tmp/
11+
COPY requirements.txt /tmp/pip-tmp/
1212
RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
13-
&& pip3 install tox && rm -rf /tmp/pip-tmp
13+
&& pip3 install tox && rm -rf /tmp/pip-tmp

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
venv
22
*.pyc
33
*~
4+
.git
5+
*.egg-info
6+
__pycache__
7+
.eggs
8+
.tox

.github/workflows/build.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
---
22
name: build
33

4-
on: push
4+
on:
5+
push:
6+
branches:
7+
- '**'
8+
schedule:
9+
# Run once a week at 00:00 on Sunday
10+
- cron: '0 0 * * 0'
11+
release:
12+
types:
13+
- created
514

615
permissions:
716
contents: read

.github/workflows/release.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ jobs:
3939
context: .
4040
file: ./Dockerfile
4141
push: true
42+
build-args: |
43+
VERSION=${{ github.event.inputs.tag }}
4244
tags: |
4345
ghcr.io/scality/bert-e:${{ inputs.tag }}
4446
registry.scality.com/bert-e/bert-e:${{ inputs.tag }}

.github/workflows/trivy.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
name: trivy
44

55
on:
6-
schedule:
7-
# Every day at noon
8-
- cron: '0 12 * * *'
96
workflow_call:
107
inputs:
118
image:

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
recursive-include bert_e/templates *
22
recursive-include bert_e/docs *
3+
include requirements.txt

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ requests==2.28.2
1818
requests-mock==1.10.0
1919
werkzeug==2.2.2
2020
WTForms==3.0.1
21-
setuptools-scm==1.9.0

setup.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python3
22

33
from os.path import abspath, dirname, join
4+
import os
45
import pip
56

67
from setuptools import setup
@@ -36,14 +37,11 @@ def requires():
3637

3738
setup(
3839
name='bert-e',
39-
use_scm_version={
40-
'local_scheme': 'dirty-tag'
41-
},
42-
setup_requires=[
43-
'setuptools_scm'
44-
],
40+
version=os.getenv('VERSION', '1.0-dev'),
41+
python_requires=">=3.10",
42+
platforms=['any'],
4543
description='Scality\'s automated branch merging tool',
46-
url='https://bitbucket.org/scality/bert-e',
44+
url='https://github.com/scality/bert-e',
4745
license='Apache',
4846
include_package_data=True,
4947
packages=[

0 commit comments

Comments
 (0)