Update main.yml #2
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: | | |
# Download the latest docker-compose release | |
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 | |
# Make the binary executable | |
sudo chmod +x /usr/local/bin/docker-compose | |
# Verify installation | |
docker-compose --version | |
- name: Build and run Docker containers | |
run: | | |
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 |