diff --git a/.github/workflows/chrome_thel8.yml b/.github/workflows/chrome_thel8.yml index 1228041..d73fb9a 100644 --- a/.github/workflows/chrome_thel8.yml +++ b/.github/workflows/chrome_thel8.yml @@ -1,36 +1,42 @@ -name: Get Chrome RPMs for RHEL8 +name: Export Chrome RPM Bundle (RHEL8) on: - workflow_dispatch: # 수동 실행 버튼 활성화 + workflow_dispatch: jobs: - download-rpms: + build-bundle: runs-on: ubuntu-latest steps: - - name: Extract RPMs using RHEL8-like Docker + - name: Checkout + uses: actions/checkout@v4 + + - name: Fetch RPMs and Zip run: | - # 1. RHEL 8 호환 이미지(Oracle Linux 8) 실행 및 패키지 다운로드 - docker run --name rpm-fetcher -v ${{ github.workspace }}:/out oraclelinux:8 /bin/bash -c " - # 저장소 설정 + # 1. 도커 내부에서 RPM 수집 (경로 및 명령어 최적화) + docker run --name fetcher -v ${{ github.workspace }}:/output oraclelinux:8 /bin/bash -c " dnf install -y dnf-utils; - cat < /etc/yum.repos.d/google-chrome.repo - [google-chrome] - name=google-chrome - baseurl=http://dl.google.com - enabled=1 - gpgcheck=1 - gpgkey=https://dl-ssl.google.com - EOF - # 의존성 포함 모든 RPM 다운로드 - mkdir /chrome_bundle; - dnf download --resolve --alldeps -y google-chrome-stable --destdir=/chrome_bundle; - cp -r /chrome_bundle/* /out/ + # 저장소 설정 (echo 방식으로 변경하여 EOF 오류 방지) + echo '[google-chrome]' > /etc/yum.repos.d/google-chrome.repo; + echo 'name=google-chrome' >> /etc/yum.repos.d/google-chrome.repo; + echo 'baseurl=http://dl.google.com' >> /etc/yum.repos.d/google-chrome.repo; + echo 'enabled=1' >> /etc/yum.repos.d/google-chrome.repo; + echo 'gpgcheck=1' >> /etc/yum.repos.d/google-chrome.repo; + echo 'gpgkey=https://dl-ssl.google.com' >> /etc/yum.repos.d/google-chrome.repo; + + mkdir -p /bundle; + # 의존성 포함 전체 다운로드 + dnf download --resolve --alldeps -y google-chrome-stable --destdir=/bundle; + # 결과를 공유 볼륨으로 이동 + cp /bundle/*.rpm /output/; " - zip -r chrome-rhel8-bundle.zip ./*.rpm + + # 2. 결과물 확인 후 압축 + ls -lh *.rpm # 파일이 잘 받아졌는지 로그에 출력 + zip chrome-rhel8-bundle.zip ./*.rpm - name: Upload Zip Artifact uses: actions/upload-artifact@v4 with: name: chrome-bundle-file path: chrome-rhel8-bundle.zip - retention-days: 1 # 1일 후 자동 삭제 + retention-days: 1