Adding git-auto-commit-action will put my status check in pending state #267
-
|
Hi! What I am trying to do:
The workflow as described almost works. However, I am having trouble when adding git-auto-commit. If How can I have this kind of workflow working with git-auto-commit? Thank you :) This is my yml file if that helps: name: Deploy to Amplify dev when PR is approved
on:
pull_request_review:
types: [submitted]
defaults:
run:
working-directory: ./working-dir
env:
ACCESS_KEY_ID: ACCESS_KEY_ID
SECRET_KEY_ID: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
APOLLO_KEY: ${{ secrets.APOLLO_KEY }}
REGION: ca-central-1
AMPLIFY_VERSION: 10.4.0
ENV: dev
jobs:
deploy:
if: github.event.review.state == 'approved'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Configure AWS CLI
run: |
aws configure set aws_access_key_id ${ACCESS_KEY_ID}
aws configure set aws_secret_access_key ${SECRET_KEY_ID}
aws configure set default.region ${REGION}
- name: Install Amplify
run: |
npm i -g @aws-amplify/cli@${AMPLIFY_VERSION}
ls
- name: Init Amplify Project
run: |
amplify init \
--amplify "{\"projectName\":\"$PROJECT_NAME\",\"envName\":\"${ENV}\",\"defaultEditor\":\"code\"}" \
--providers "{\"awscloudformation\":{\"configLevel\":\"project\",\"useProfile\":true,\"profileName\":\"default\"}}"
amplify env checkout ${ENV}
- name: Install dependencies and build
run: |
npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
npm install
npm run codegen
- name: Push Amplify
run: npm run api-push
- name: Publish schema to Apollo Studio
run: |
npm run prepare-schema
npm run publish-schema-to-apollo
- name: Commit ouput of amplify push
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: push to dev env |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi there The "pending state" happens, as commits triggered by git-auto-commit – by default – don't trigger other workflows. This can be solved by creating a new personal access token (PAT) and pass it to the See also previous issue where the same issue was reported: |
Beta Was this translation helpful? Give feedback.
Hi there
The "pending state" happens, as commits triggered by git-auto-commit – by default – don't trigger other workflows.
This can be solved by creating a new personal access token (PAT) and pass it to the
actions/checkout-Action. (actions/checkout sets up the authentication that git-auto-commit uses)See also previous issue where the same issue was reported: