Created
June 8, 2024 18:02
-
-
Save si3mshady/4288132cc53a6c09a9337d4cc6d53e52 to your computer and use it in GitHub Desktop.
Github action that will install docker and autogen script cicd_autogen.py
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: Install Docker on CentOS | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
install-docker: | |
runs-on: ubuntu-latest | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up CentOS environment | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install Docker on CentOS | |
run: | | |
#!/bin/bash | |
# Update package repositories | |
sudo apt-get update | |
# Install Docker Engine | |
sudo apt-get install -y docker-ce docker-ce-cli containerd.io | |
# Start Docker service | |
sudo systemctl start docker | |
# Enable Docker service to start on boot | |
sudo systemctl enable docker | |
# Add current user to the "docker" group (optional) | |
sudo usermod -aG docker $USER | |
# Print Docker version | |
docker --version | |
echo "Docker installation completed successfully!" | |
python3 -m venv pyautogen | |
source pyautogen/bin/activate | |
pip install pyautogen | |
python3 cicd_autogen.py "generate 3 files and save them as lambda_handler_for_linkedin.py boto_handler_for_linkedin.py and elliottarnold.py in the first file create a function with \ | |
3 sub functions that return jokes, in the second file use boto3 to and create agent with aws bedrock and the 3rd file fill it with the text THIS POST WAS CREATED BY ELLIOTT ARNOLD. Work smartly" \ | |
&& ls -lrth . && cd elliottsExampleForLinkedinJune8 && for file in $(ls); do cat $file; done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment