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

Add ability to provide auth to private repo for requirements_git
This commit is contained in:
Hao Liu
2025-02-12 14:20:13 -05:00
committed by GitHub
parent 69a60493a3
commit f8ff48fe5c
8 changed files with 39 additions and 1 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:
@@ -73,6 +74,11 @@ jobs:
make ui
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 }}