Skip to content

feat: update workflows to use GH_TOKEN references #1173

feat: update workflows to use GH_TOKEN references

feat: update workflows to use GH_TOKEN references #1173

name: Packaging helper methods tests
on:
push:
branches:
- "**"
workflow_dispatch:
jobs:
unit_test_execution:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
pull-requests: read
steps:
- name: Create GitHub App token
id: app
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_KEY }}
owner: citusdata
- name: Setup git authentication for GitHub App
env:
GH_TOKEN: ${{ steps.app.outputs.token }}
run: |
git config --global url."https://x-access-token:${GH_TOKEN}@github.com/".insteadOf "https://github.com/"
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ steps.app.outputs.token }}
submodules: true
- name: Install package dependencies
run: sudo apt-get update && sudo apt-get install libcurl4-openssl-dev libssl-dev python3-testresources
- name: Install python requirements
run: python -m pip install -r packaging_automation/requirements.txt
- name: Citus package tests
env:
GH_TOKEN: ${{ steps.app.outputs.token }}
run: python -m pytest -q packaging_automation/tests/test_citus_package_utils.py