Use full path for .vault file (#1746) #6
This file contains hidden or 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: QA Deploy | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: {} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
qa-deploy: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
strategy: | |
matrix: | |
python-version: [ 3.12 ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pipenv" | |
- name: Install pipenv | |
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python | |
- name: Install dependencies | |
run: pipenv install --dev | |
- name: Checkout ansible-playbook-airflow (private) | |
uses: actions/checkout@v4 | |
with: | |
repository: tulibraries/ansible-playbook-airflow | |
token: ${{ secrets.MY_PAT }} | |
path: ansible-playbook-airflow | |
ref: qa | |
- name: Run Ansible Airflow Playbook for QA | |
working-directory: ansible-playbook-airflow | |
run: | | |
pipenv run ansible-galaxy install -r requirements.yml | |
cp cp ${{ github.workspace }}/.github/.vault ~/.vault; | |
chmod +x ~/.vault | |
pipenv run ansible-playbook -i inventory/qa playbook.yml --tags "jumphost,role::airflow::dags" --vault-password-file=~/.vault -e 'ansible_ssh_port=9229' |