-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add github action * fix _zrb.yml * update _zrb.yml * update github action * update zrb * update to 0.0.104
- Loading branch information
1 parent
9ba8271
commit 55f1c11
Showing
7 changed files
with
60 additions
and
52 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Run Command | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
command: | ||
required: true | ||
type: string | ||
environment: | ||
required: true | ||
type: string | ||
secrets: {} | ||
|
||
jobs: | ||
|
||
# Docs: https://docs.github.com/en/actions/using-workflows/reusing-workflows | ||
Run-command: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: stalchmst/zrb:0.0.103 | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
- name: Show Info | ||
run: | | ||
echo "🙋 PIC: ${{ github.actor }}" | ||
echo "🎉 Event: ${{ github.event_name }}" | ||
echo "🐧 OS: ${{ runner.os }}" | ||
echo "🔎 Branch: ${{ github.ref }}" | ||
echo "🔎 Repo: ${{ github.repository }}" | ||
- name: Run command | ||
shell: bash | ||
run: | | ||
set -e | ||
export ZRB_ENV=${{ inputs.environment }} | ||
export ZRB_SHOW_PROMPT=false | ||
echo "🏁 Start running" | ||
${{ inputs.command }} | ||
- run: echo "🍏 This job's status is ${{ job.status }}." |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: "Hello" | ||
run-name: "Run hello for ${{ github.actor }}" | ||
on: [push] | ||
|
||
jobs: | ||
run-command: | ||
uses: ./.github/workflows/_zrb.yml | ||
with: | ||
environment: DEV | ||
command: | | ||
zrb explain solid |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,8 @@ | ||
FROM debian:bookworm-slim | ||
FROM python:3.10-bookworm | ||
|
||
# Create and set workdir | ||
RUN mkdir -p /project | ||
WORKDIR /project | ||
|
||
# Update and set third party repositories | ||
RUN apt update --fix-missing && apt upgrade -y | ||
RUN apt install -y ca-certificates curl gnupg | ||
RUN install -m 0755 -d /etc/apt/keyrings | ||
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ | ||
chmod a+r /etc/apt/keyrings/docker.gpg && \ | ||
echo \ | ||
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ | ||
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ | ||
tee /etc/apt/sources.list.d/docker.list > /dev/null | ||
RUN apt update | ||
|
||
# Install packages | ||
RUN apt install -y git ncat curl wget inetutils-tools inetutils-ping \ | ||
docker.io docker-compose-plugin zsh python-is-python3 pip \ | ||
build-essential libssl-dev zlib1g-dev \ | ||
libbz2-dev libreadline-dev libsqlite3-dev curl \ | ||
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev && \ | ||
apt autoremove -yqq --purge && \ | ||
apt clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Install pyenv | ||
RUN curl https://pyenv.run | bash | ||
|
||
# Configure pyenv for bash shell | ||
RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc | ||
RUN echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc | ||
RUN echo 'eval "$(pyenv init -)"' >> ~/.bashrc | ||
|
||
# Install Python 3.10 on pyenv | ||
RUN bash -c 'source ~/.bashrc && pyenv install 3.11 && pyenv global 3.11' | ||
|
||
# Configure zsh shell | ||
RUN sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | ||
|
||
RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc | ||
RUN echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc | ||
RUN echo 'eval "$(pyenv init -)"' >> ~/.zshrc | ||
|
||
# Install Zrb on top of pyenv | ||
RUN bash -c 'source ~/.bashrc && pip install zrb==ZRB_VERSION' | ||
|
||
# Prepare environments | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Set command | ||
CMD ["bash", "-c", "echo 'To start working, invoke: docker exec -it <this-container-name> zsh' && sleep infinity"] | ||
# Install zrb | ||
RUN pip install zrb==ZRB_VERSION |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi" | |
|
||
[project] | ||
name = "zrb" | ||
version = "0.0.103" | ||
version = "0.0.104" | ||
authors = [ | ||
{ name="Go Frendi Gunawan", email="[email protected]" }, | ||
] | ||
|
1 change: 1 addition & 0 deletions
1
src/zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/.python-version
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.10.0 |