Update run.sh #28
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: Docker Image CI Workflow | |
| on: | |
| push: | |
| paths-ignore: | |
| - '**/*.md' | |
| - 'LICENSE' | |
| branches: | |
| - docker | |
| pull_request: | |
| paths-ignore: | |
| - '**/*.md' | |
| - 'LICENSE' | |
| branches: | |
| - docker | |
| env: | |
| APP_NAME: androidtvbackground | |
| jobs: | |
| build-and-push: | |
| if: github.repository == 'adelatour11/androidtvbackground' | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Github Checkout | |
| uses: actions/checkout@v4 | |
| - name: Get version | |
| id: version | |
| run: | | |
| VERSION=$(cat VERSION) | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| # GHCR | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| # Build & Push to multiple registries | |
| - name: Build and push docker image with tags | |
| id: build-push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: true | |
| build-args: | | |
| VERSION=${{ env.VERSION }} | |
| tags: | | |
| ghcr.io/${{ github.repository_owner }}/${{ env.APP_NAME }}:${{ env.VERSION }} | |
| ghcr.io/${{ github.repository_owner }}/${{ env.APP_NAME }}:latest |