mirror of
https://github.com/ansible/awx.git
synced 2026-01-31 17:18:59 -03:30
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:
9
.github/actions/awx_devel_image/action.yml
vendored
9
.github/actions/awx_devel_image/action.yml
vendored
@@ -4,6 +4,10 @@ inputs:
|
||||
github-token:
|
||||
description: GitHub Token for registry access
|
||||
required: true
|
||||
private-github-token:
|
||||
description: GitHub Token for private repositories
|
||||
required: false
|
||||
default: ''
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
@@ -22,6 +26,11 @@ runs:
|
||||
run: |
|
||||
echo "${{ inputs.github-token }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||
|
||||
- name: Add Private github token to requirements_git.credentials.txt
|
||||
shell: bash
|
||||
run: echo "https://x-access-token:${{ inputs.private-github-token }}@github.com" >> requirements/requirements_git.credentials.txt
|
||||
if: ${{ inputs.private-github-token != '' }}
|
||||
|
||||
- name: Pre-pull latest devel image to warm cache
|
||||
shell: bash
|
||||
run: docker pull -q ghcr.io/${OWNER_LC}/awx_devel:${{ github.base_ref }}
|
||||
|
||||
5
.github/actions/run_awx_devel/action.yml
vendored
5
.github/actions/run_awx_devel/action.yml
vendored
@@ -9,6 +9,10 @@ inputs:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
private-github-token:
|
||||
description: GitHub Token for private repositories
|
||||
required: false
|
||||
default: ''
|
||||
outputs:
|
||||
ip:
|
||||
description: The IP of the tools_awx_1 container
|
||||
@@ -23,6 +27,7 @@ runs:
|
||||
uses: ./.github/actions/awx_devel_image
|
||||
with:
|
||||
github-token: ${{ inputs.github-token }}
|
||||
private-github-token: ${{ inputs.private-github-token}}
|
||||
|
||||
- name: Upgrade ansible-core
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user