From 70c9167ac94d225f2660a93297d42cc47a6a4d9e Mon Sep 17 00:00:00 2001 From: Jamil Omar Falconi Aguirre Date: Mon, 29 Jan 2024 10:45:21 -0500 Subject: [PATCH] added test action with github app --- .github/workflows/test-github-app.yml | 41 +++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/test-github-app.yml diff --git a/.github/workflows/test-github-app.yml b/.github/workflows/test-github-app.yml new file mode 100644 index 000000000..dc91d35e4 --- /dev/null +++ b/.github/workflows/test-github-app.yml @@ -0,0 +1,41 @@ + +name: Test Github App +on: + workflow_dispatch: + +jobs: + auto_publish_job: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + fetch-depth: 0 + persist-credentials : false + - name: Generate a token + id: generate_token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + + - name: Use the token + env: + GH_TOKEN: ${{ steps.generate_token.outputs.token }} + run: | + gh api octocat + - name: Add test file + run: | + touch test.txt + - name: Commit files + run: | + git add . + git config --local user.email ${{ secrets.APP_ID }}+axle-auth-helper[bot]@users.noreply.github.com + git config --local user.name "axle-auth-helper[bot]" + git commit -a -m "Adding test file" + - name: Push changes + uses: ad-m/github-push-action@master + with: + force: true + github_token: ${{ steps.generate_token.outputs.token }} \ No newline at end of file