Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update scaf to use copier and multiple templates #450

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 2 additions & 35 deletions .github/workflows/setup-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,8 @@ 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:
Expand All @@ -58,11 +27,9 @@ jobs:
- 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 dev
git config --global user.email "setup-project--create@example.com"
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
REPO_URL="https://github.com/sixfeetup/scaf-templates.git"
$HOME/.local/bin/scaf myproject --defaults --vcs-ref main $REPO_URL
14 changes: 0 additions & 14 deletions Dockerfile

This file was deleted.

33 changes: 0 additions & 33 deletions cookiecutter.json

This file was deleted.

83 changes: 0 additions & 83 deletions entrypoint.sh

This file was deleted.

Loading
Loading