Delete docs/screenshot1.png #31
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: Publish Docker Image | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| auto-release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Read version from config.yaml | |
| id: get_version | |
| run: | | |
| VERSION=$(grep '^version:' espforge/config.yaml | sed 's/version: *"//;s/"//') | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Create release if tag does not exist | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| VERSION="${{ steps.get_version.outputs.version }}" | |
| TAG="v${VERSION}" | |
| if git ls-remote --tags origin "$TAG" | grep -q "$TAG"; then | |
| echo "Tag $TAG already exists, skipping release." | |
| else | |
| gh release create "$TAG" \ | |
| --title "$TAG" \ | |
| --generate-notes \ | |
| --target main | |
| echo "Created release $TAG" | |
| fi | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Read version from config.yaml | |
| id: get_version | |
| run: | | |
| VERSION=$(grep '^version:' espforge/config.yaml | sed 's/version: *"//;s/"//') | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| REPO_LC=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]') | |
| echo "repo_lc=$REPO_LC" >> "$GITHUB_OUTPUT" | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./espforge | |
| push: true | |
| platforms: linux/amd64,linux/arm64,linux/arm/v7 | |
| tags: | | |
| ghcr.io/${{ steps.get_version.outputs.repo_lc }}:${{ steps.get_version.outputs.version }} | |
| ghcr.io/${{ steps.get_version.outputs.repo_lc }}:latest | |
| build-args: | | |
| VITE_BASE_PATH=./ |