feat: Add image and avatar delete APIs #2
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| create-gh-release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Generate CHANGELOG.md | |
| run: | | |
| PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "") | |
| CUR_TAG=${GITHUB_REF_NAME} | |
| LOG_FORMAT='- **`%h`** %s by @%cn' | |
| REPO_URL="https://github.com/${{ github.repository }}" | |
| if [ -z "$PREV_TAG" ]; then | |
| echo "## Initial Release" > CHANGELOG.md | |
| echo "" >> CHANGELOG.md | |
| git log --reverse --pretty=format:"$LOG_FORMAT" >> CHANGELOG.md | |
| else | |
| echo "## Changelog $PREV_TAG..$CUR_TAG" > CHANGELOG.md | |
| echo "" >> CHANGELOG.md | |
| git log $PREV_TAG..HEAD --reverse --pretty=format:"$LOG_FORMAT" >> CHANGELOG.md | |
| echo "" >> CHANGELOG.md | |
| echo "" >> CHANGELOG.md | |
| echo "**Full Changelog**: [\`$PREV_TAG..$CUR_TAG\`]($REPO_URL/compare/$PREV_TAG...$CUR_TAG)" >> CHANGELOG.md | |
| fi | |
| - uses: softprops/action-gh-release@v2 | |
| if: github.ref_type == 'tag' | |
| with: | |
| generate_release_notes: false | |
| body_path: CHANGELOG.md | |
| files: | | |
| LICENSE | |
| build-and-push-docker-image: | |
| needs: create-gh-release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Build and Push Docker Image | |
| run: | | |
| VERSION=${GITHUB_REF_NAME#v} | |
| IMAGE=ghcr.io/${{ github.repository }}:$VERSION | |
| docker build -t $IMAGE . | |
| docker push $IMAGE |