release 9.0.2 #283
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 | |
| run-name: release ${{ inputs.tag }} | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Tag to be released' | |
| required: true | |
| env: | |
| PROJECT_NAME: ${{ github.event.repository.name }} | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildk | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ github.token }} | |
| - name: Install Oras | |
| run: | | |
| curl -L https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_linux_amd64.tar.gz | \ | |
| tar -xz -C /usr/local/bin oras | |
| env: | |
| ORAS_VERSION: 1.2.2 | |
| - name: Push dashboards into the production namespace | |
| run: | | |
| oras push ghcr.io/${{ github.repository }}/${{ env.PROJECT_NAME }}-dashboards:${{ github.event.inputs.tag }} \ | |
| dashboard.json:application/grafana-dashboard+json \ | |
| alerts.yaml:application/prometheus-alerts+yaml | |
| working-directory: monitoring | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: true | |
| tags: ghcr.io/${{ github.repository }}:${{ github.event.inputs.tag }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Build and push federation image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| push: true | |
| context: images/federation | |
| provenance: false | |
| build-args: | |
| CLOUDSERVER_VERSION=${{ github.event.inputs.tag }} | |
| tags: | | |
| ghcr.io/${{ github.repository }}:${{ github.event.inputs.tag }}-federation | |
| labels: | | |
| git.repository=${{ github.repository }} | |
| git.commit-sha=${{ github.sha }} | |
| cache-from: type=gha,scope=federation | |
| cache-to: type=gha,mode=max,scope=federation | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| with: | |
| name: Release ${{ github.event.inputs.tag }} | |
| tag_name: ${{ github.event.inputs.tag }} | |
| generate_release_notes: true | |
| target_commitish: ${{ github.sha }} |