[Snyk] Security upgrade python from 3.12.1-alpine to 3.14.0a1-alpine #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Continuous Integration | |
on: | |
pull_request: | |
branches: | |
- main | |
# Run workflow every time a pull request is opened or reopened | |
types: [opened, reopened, ready_for_review, edited] | |
# allow manual triggers for now too | |
workflow_dispatch: | |
manual: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push minitwit test | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile.test | |
push: true | |
tags: ${{ secrets.DOCKER_USERNAME }}/maxitwittest:latest | |
cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/maxitwittest:testbuildcache | |
cache-to: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/maxitwittest:testbuildcache,mode=max | |
- name: Install Snyk | |
run: npm install -g snyk | |
- name: Run Snyk to check for vulnerabilities | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
run: snyk test --all-projects || echo "Snyk found vulnerabilities!" | |
- name: Test maxitwit | |
run: | | |
docker build -t $DOCKER_USERNAME/maxitwittest -f Dockerfile.test . | |
yes 2>/dev/null | docker compose -f tests_compose.yaml up --build -d | |
chmod +x ./wait_for_compose.sh | |
./wait_for_compose.sh | |
docker run --rm --network=maxitwit-test $DOCKER_USERNAME/maxitwittest | |
env: | |
TARGET: production | |
SESSION_SECRET: ${{ secrets.SESSION_SECRET }} | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} |