Add ability to provide token for private repo for requirements_git in container build (#15831) (#6830)

Add ability to provide auth to private repo for requirements_git
This commit is contained in:
Hao Liu
2025-02-12 15:00:37 -05:00
committed by GitHub
parent 63bb4d66ef
commit 397fb297bf
8 changed files with 38 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ name: Build/Push Development Images
env:
LC_ALL: "C.UTF-8" # prevent ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
DOCKER_CACHE: "--no-cache" # using the cache will not rebuild git requirements and other things
CI_PRIVATE_GITHUB_TOKEN: ${{ secrets.PRIVATE_GITHUB_TOKEN }}
on:
workflow_dispatch:
push:
@@ -85,6 +86,11 @@ jobs:
make ui-next
if: matrix.build-targets.image-name == 'awx'
- name: Add private GitHub token to requirements_git.credentials.txt
shell: bash
run: echo "https://x-access-token:${{ secrets.PRIVATE_GITHUB_TOKEN }}@github.com"" >> requirements/requirements_git.credentials.txt
if: ${{ env.CI_PRIVATE_GITHUB_TOKEN != '' }}
- name: Build and push AWX devel images
run: |
make ${{ matrix.build-targets.make-target }}