Merge pull request #32 from r4ulcl/dev #28
Workflow file for this run
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 Build and Publish Manager | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| docker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set lowercase repository name | |
| id: set_lowercase_repo | |
| run: | | |
| LOWERCASE_REPO=$(echo "${GITHUB_REPOSITORY}" | tr '[:upper:]' '[:lower:]') | |
| echo "::set-output name=lowercase_repo::${LOWERCASE_REPO}" | |
| # manager docker | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ steps.set_lowercase_repo.outputs.lowercase_repo }}-manager | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Login to GitHub Container Registry | |
| run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
| # Push | |
| - name: Build and push | |
| id: docker_build | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: ./manager/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: | | |
| ${{ steps.meta.outputs.tags }} | |
| ghcr.io/${{ steps.set_lowercase_repo.outputs.lowercase_repo }}-manager:latest | |
| ghcr.io/${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} |