[wip] full docker #11
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: Basic Env Docker Build and Publish | ||
| on: | ||
| push: | ||
| branches: [ "master" ] | ||
| workflow_run: | ||
| workflows: [ "envbase" ] | ||
| branches: [ "master" ] | ||
| types: [ "completed" ] | ||
| env: | ||
| REGISTRY: ghcr.io | ||
| IMAGE_NAME: xs-mlvp/envbase | ||
| FULL_IMAGE_NAME: xs-mlvp/envfull | ||
| IMAGE_TAG: ${{ github.sha.substring(0, 7) }} | ||
|
Check failure on line 15 in .github/workflows/envbase.yaml
|
||
| jobs: | ||
| build-and-push-base: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v2 | ||
| - name: Log in to GitHub Container Registry | ||
| uses: docker/login-action@v2 | ||
| with: | ||
| registry: ${{ env.REGISTRY }} | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Build and push Docker image | ||
| uses: docker/build-push-action@v4 | ||
| with: | ||
| context: . | ||
| file: ./docker/Dockerfile | ||
| platforms: linux/amd64,linux/arm64 | ||
| push: true | ||
| tags: | | ||
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} | ||
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | ||
| cache-from: type=local,src=/tmp/.buildx-cache | ||
| cache-to: type=local,dest=/tmp/.buildx-cache | ||
| build-and-push-full: | ||
| runs-on: ubuntu-latest | ||
| needs: build-and-push-base | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v2 | ||
| - name: Log in to GitHub Container Registry | ||
| uses: docker/login-action@v2 | ||
| with: | ||
| registry: ${{ env.REGISTRY }} | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Build and push Docker image | ||
| uses: docker/build-push-action@v4 | ||
| with: | ||
| context: . | ||
| file: ./docker/Dockerfile.full | ||
| platforms: linux/amd64,linux/arm64 | ||
| push: true | ||
| tags: | | ||
| ${{ env.REGISTRY }}/${{ env.FULL_IMAGE_NAME }}:${{ env.IMAGE_TAG }} | ||
| ${{ env.REGISTRY }}/${{ env.FULL_IMAGE_NAME }}:latest | ||
| cache-from: type=local,src=/tmp/.buildx-cache | ||
| cache-to: type=local,dest=/tmp/.buildx-cache | ||