fix: repo checkout #12
  
    
      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 Push Docker Image | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| jobs: | |
| docker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout code | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| # Login Docker Hub | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| # Build & Push image | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: true | |
| tags: dipperpinees/soundwave:${{ github.sha }} | |
| build-args: | | |
| GOOGLE_CLIENT_ID=${{ secrets.GOOGLE_CLIENT_ID }} | |
| # Update manifest in another repository | |
| - name: Checkout manifest repository | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ secrets.MANIFEST_REPOSITORY }} | |
| token: ${{ secrets.MANIFEST_REPO_TOKEN }} | |
| path: manifest-repo | |
| - name: Update manifest | |
| run: | | |
| cd manifest-repo | |
| # Update the tag in soundwave/values.yaml with the new Docker image tag | |
| sed -i "s|tag: \".*\"|tag: \"${{ github.sha }}\"|g" soundwave/values.yaml | |
| # Configure git | |
| git config user.name "GitHub Actions" | |
| git config user.email "actions@github.com" | |
| # Commit and push changes | |
| git add soundwave/values.yaml | |
| git commit -m "Update soundwave image tag to ${{ github.sha }}" | |
| git push |