chore(deps): update dependency fastapi to ^0.128.0 #71
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: Build and publish | |
| on: | |
| push: | |
| tags: ['v*'] | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| push: | |
| description: 'Push' | |
| required: false | |
| type: boolean | |
| default: true | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: diff2rss | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/setup-qemu-action@v3 | |
| - uses: docker/setup-buildx-action@v3 | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: docker/metadata-action@v5 | |
| id: meta | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=semver,pattern={{major}} | |
| type=ref,event=tag | |
| type=ref,event=pr | |
| - name: Build and push image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: ${{ inputs.push != 'false' }} # is null if trigger != workflow_dispatch | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| annotations: ${{ steps.meta.outputs.annotations }} | |
| platforms: linux/amd64,linux/arm64 | |
| cache-from: | | |
| type=gha | |
| type=gha,scope=main | |
| cache-to: type=gha,mode=max | |
| provenance: false | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download build artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ needs.build.outputs.OUTPUT_FILE }} | |
| - name: Parse tags | |
| id: parse_tags | |
| run: | | |
| git fetch -a | |
| echo "tag_count=$(git tag -l | wc -l)" >> $GITHUB_OUTPUT | |
| - name: Update CHANGELOG | |
| continue-on-error: ${{ steps.parse_tags.outputs.tag_count == '1' }} | |
| id: changelog | |
| uses: requarks/changelog-action@v1 | |
| with: | |
| token: ${{ github.token }} | |
| tag: ${{ github.ref_name }} | |
| - name: Create Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| allowUpdates: true | |
| draft: false | |
| makeLatest: true | |
| name: ${{ github.ref_name }} | |
| body: ${{ steps.changelog.outputs.changes }} | |
| token: ${{ github.token }} | |
| artifacts: ${{ needs.build.outputs.OUTPUT_FILE }} | |
| - name: Commit CHANGELOG.md | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| branch: main | |
| commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }}' | |
| file_pattern: CHANGELOG.md |