chore: release v0.1.9 #30
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-replane-image | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ['v*.*.*'] | |
| permissions: | |
| contents: write # needed to create GitHub Releases | |
| packages: write | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository_owner }}/replane | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU (multi-arch) | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} | |
| type=raw,value=edge,enable=${{ github.ref == 'refs/heads/main' }} | |
| type=ref,event=tag | |
| type=sha,format=short | |
| - name: Enable corepack | |
| run: corepack enable | |
| - name: Build and push image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| # Repository root holds the Dockerfile; previously pointed to ./replane which doesn't exist | |
| context: . | |
| file: ./Dockerfile | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| NEXT_PUBLIC_BUILD_SHA=${{ github.sha }} | |
| - name: Summary | |
| run: | | |
| echo "Published image tags:" >> $GITHUB_STEP_SUMMARY | |
| echo "${{ steps.meta.outputs.tags }}" >> $GITHUB_STEP_SUMMARY | |
| - name: Create GitHub Release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: Replane ${{ github.ref_name }} | |
| generate_release_notes: true | |
| body: | | |
| Docker images published with this release: | |
| ${{ steps.meta.outputs.tags }} | |
| Pull the image: | |
| docker pull ghcr.io/${{ env.IMAGE_NAME }}:${{ github.ref_name }} |