Update main.yml #3
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: Generate Repository Text with Docker Compose | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Docker | |
uses: docker/setup-buildx-action@v2 | |
- name: Install Docker Compose | |
run: | | |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.20.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
docker-compose --version | |
- name: Set working directory and build Docker containers | |
run: | | |
cd path/to/your/repo # Replace with the actual path to your repo | |
docker-compose up --build | |
- name: Copy output files | |
run: | | |
cp /home/user/output/* ./output/ | |
- name: Upload output as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: repo-text-output | |
path: ./output/repo-to-text_*.txt |