profile Yoon ChaeYoung Backend

3D Contribution 적용법

» Study

개요


사용 계기

Github 프로필을 작성하는 도중 여러 Github 사용자들의 README.md 파일을 구경하게 되었다.

이때 시각적으로 Contribution을 확인할 수 있는 프로필을 보고 나도 하고 싶다는 생각에 3D Contribution을 찾아보게 되었다.


목적

Github 프로필에 시각적으로 Contribution을 보여주기 위함


사용 방법

1. Repository 생성

Repository name = Owner

(참고) 이미 존재하는 Repository이기 때문에 경고 표시가 뜸

Repository 생성

2. Token 생성

Settings > Developer Settings

Personal access tokens > Tokens(classic)

Generate new token > Generate new token(classic)

Token 생성

3. Settings 설정

본인 Repository 내 Settings

Security > Secrets and variables > Action

Action

New repository secret 클릭

New repository secret

Name: Token

Secret: Token 복사/붙여넣기

Action Token

Add secret 클릭

4. Action 설정

Action 클릭

Action

New workflow 클릭

New workflow

set up a workflow yourself 클릭

set up a workflow yourself

파일 이름: main.yml > profile-3d.yml 변경

아래 내용 복사/붙여넣기

깃허브이름, 깃허브이메일 이라고 작성된 부분은 각자 Github name, email로 수정

name: GitHub-Profile-3D-Contrib

on:
  schedule: # 03:00 JST == 18:00 UTC
    - cron: "0 18 * * *"
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    name: generate-github-profile-3d-contrib
    steps:
      - uses: actions/checkout@v2
      - uses: yoshi389111/github-profile-3d-contrib@0.6.0
        env:
          GITHUB_TOKEN: $
          USERNAME: $
      - name: Commit & Push
        run: |
          git config user.name 깃허브이름
          git config user.email 깃허브이메일
          git add -A .
          git commit -m "generated"
          git push

Run workflow > Run workflow

Run workflow

5. README 파일에 추가

아래 코드 복사/붙여넣기(적용한 테마: south-season-animate)

![](./profile-3d-contrib/profile-south-season-animate.svg)

원하는 테마 적용

샘플 https://github.com/yoshi389111/github-profile-3d-contrib.git

profile-3d-contrib/profile-green-animate.svg
profile-3d-contrib/profile-green.svg
profile-3d-contrib/profile-season-animate.svg
profile-3d-contrib/profile-season.svg
profile-3d-contrib/profile-south-season-animate.svg
profile-3d-contrib/profile-south-season.svg
profile-3d-contrib/profile-night-view.svg
profile-3d-contrib/profile-night-green.svg
profile-3d-contrib/profile-night-rainbow.svg
profile-3d-contrib/profile-gitblock.svg

느낀점

Github Action 기능을 시도해 보지 않았을 때는 어려울 거라고 생각했다. 이 기회에 처음 시도해 보는 기능이었지만 사용하면 편리한 기능임을 깨달았다. 앞으로는 Workflow를 자동화할 때 자주 사용하려 한다.