Python/Deploy

actions/create-release@v1 사용 시, Resource not accessible by integration 해결방법

bonevillain 2023. 7. 10. 20:02

Github action 사용하면서 Release 자동 생성 step을 넣어줬었는데

Resource not accessible by integration 에러가 났었다.

 

아래와 같이 create-release 공식 예제 소스를 넣었는데도 에러가 났다. 

- name: Create Release
	id: create_release
    uses: actions/create-release@v1
    env:
    	GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    with:
    	tag_name: ${{ github.ref }}
        release_name: Release ${{ github.ref }}
        body: |
        	Changes in this Release
            - First Change
            - Second Change
        draft: false
        prerelease: false



쓰기 권한을 넣어줬더니 이상없이 동작하였다.

permissions:
  contents: write

 

예시

name: Create Release 

on:
  push:
    tags:
      - 'v*.*.*'

permissions:

  contents: write

jobs:
  deploy:
    name: Deploy
    runs-on: ubuntu-latest
    steps:
    - name: Checkout code
      uses: actions/checkout@v3
    - name: Create Release
      id: create_release
      uses: actions/create-release@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        tag_name: ${{ github.ref }}
        release_name: Release ${{ github.ref }}
        body: |
          Changes in this Release
          - Test
        draft: false
        prerelease: false

'Python > Deploy' 카테고리의 다른 글

Ubuntu Python 패키지 관리툴로 설치  (0) 2023.07.10
Ubuntu Python 소스 설치  (0) 2023.07.10
Ubuntu pyenv pipenv install  (0) 2023.07.10
Ubuntu 22.04 Nginx HTTPS 적용  (0) 2023.07.10