Skip to content

[Snyk] Security upgrade zipp from 3.15.0 to 3.19.1 (#279) #494

[Snyk] Security upgrade zipp from 3.15.0 to 3.19.1 (#279)

[Snyk] Security upgrade zipp from 3.15.0 to 3.19.1 (#279) #494

name: Create scaf project
on: [push]
jobs:
build-and-push:
environment: dev
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
# not needed? https://github.com/docker/build-push-action/tree/releases/v5?tab=readme-ov-file#git-context
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build and push Docker image using github's buildkit cache
uses: docker/build-push-action@v5
with:
push: true
tags: |
sixfeetup/scaf:${{ github.sha }}
sixfeetup/scaf:latest
context: .
file: ./Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
setup:
environment: dev
needs: build-and-push
runs-on: ubuntu-latest
steps:
- name: Install Requirements
shell: bash
run: |
sudo apt-get update && sudo apt-get install --only-upgrade curl
sudo apt-get update && sudo apt-get install --only-upgrade make
sudo apt-get update && sudo apt-get install --only-upgrade python3
INSTALL_URL="https://raw.githubusercontent.com/sixfeetup/scaf/$GITHUB_REF_NAME/install.sh"
export SCAF_SCRIPT_BRANCH=$GITHUB_REF_NAME
git config --global init.defaultBranch main
git config --global user.email "[email protected]"
git config --global user.name "CI CD install deps"
echo "Downloading install script from $INSTALL_URL"
rm -f $HOME/.local/bin/scaf
echo "Installing scaf from $INSTALL_URL"
curl -sSL $INSTALL_URL | DEBUG=True bash
- name: Create Project with Scaf
shell: bash
run: |
IMAGE_TAG=$GITHUB_SHA
echo "Running scaf with sixfeetup/scaf:$IMAGE_TAG"
git config --global init.defaultBranch main
git config --global user.email "[email protected]"
git config --global user.name "CI CD Setup Project"
REPO_URL="https://github.com/sixfeetup/scaf.git"
$HOME/.local/bin/scaf myproject --no-input --checkout $GITHUB_REF_NAME $REPO_URL