chore: Delete venv directory #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ai-ci-workflows | |
| on: | |
| push: | |
| branches: [develop] | |
| paths-ignore: | |
| - '.github/workflows/**' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| id-token: write | |
| packages: write | |
| issues: write # [추가] 이슈 생성을 위해 쓰기 권한 필요 | |
| jobs: | |
| docker-build-and-push: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| image_tag: ${{ steps.set-vars.outputs.sha_short }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set variables | |
| id: set-vars | |
| run: | | |
| echo "owner=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_OUTPUT | |
| echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build & Push Image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: true | |
| tags: ghcr.io/${{ steps.set-vars.outputs.owner }}/ai:${{ steps.set-vars.outputs.sha_short }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Build Succeed Message | |
| run: echo "succeed to build and push docker image" | |
| update-manifest-repo: | |
| runs-on: ubuntu-latest | |
| needs: docker-build-and-push | |
| steps: | |
| - name: Determine branch | |
| id: branch | |
| run: echo "branch=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT | |
| - name: Checkout Manifests Repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ github.repository_owner }}/OpenWallet-manifests | |
| token: ${{ secrets.MANIFEST_ACCESS }} | |
| ref: ${{ steps.branch.outputs.branch }} | |
| - name: Update Image Tag | |
| uses: fjogeleit/[email protected] | |
| with: | |
| valueFile: apps/ai/values.yaml | |
| changes: | | |
| { | |
| "image.repository": "ghcr.io/${{ github.repository_owner }}/ai", | |
| "image.tag": "${{ needs.docker-build-and-push.outputs.image_tag }}" | |
| } | |
| updateFile: true | |
| commitChange: false | |
| - name: Commit & Push | |
| run: | | |
| git config user.name "${{ github.actor }}" | |
| git config user.email "${{ github.actor }}@users.noreply.github.com" | |
| git add . | |
| git commit -m "Update image to ${{ needs.docker-build-and-push.outputs.image_tag }}" || echo "No changes to commit" | |
| git push origin ${{ steps.branch.outputs.branch }} | |
| echo "Commit And Push Complete. Actor: ${{ github.actor }}" |