Skip to content

Commit

Permalink
dbg docker context path (#40)
Browse files Browse the repository at this point in the history
* dbg docker context path

* docker load true

* add caching to workflow
  • Loading branch information
usrbinkat authored Jan 18, 2024
1 parent 0798893 commit a0a5f63
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,38 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build & Publish Dev Container
id: docker_build
name: repository_owner to lower case
id: repository_owner
uses: Entepotenz/change-string-case-action-min-dependencies@v1
with:
string: ${{ github.repository_owner }}
-
name: repository to lower case
id: repository
uses: Entepotenz/change-string-case-action-min-dependencies@v1
with:
string: ${{ github.repository }}
-
name: Container Build
uses: docker/build-push-action@v5
id: container-build
with:
push: false
context: .
file: Dockerfile
cache-to: type=inline
cache-from: type=registry,ref=ghcr.io/${{ steps.repository.outputs.lowercase }}:${{ github.sha }}
context: docker
file: docker/Dockerfile
platforms: linux/amd64,linux/arm64
tags: 'ghcr.io/${{ github.repository_owner }}/devcontainer:latest'
tags: "ghcr.io/${{ steps.repository.outputs.lowercase }}:latest,ghcr.io/${{ steps.repository.outputs.lowercase }}:${{ github.sha }}"
-
name: Push Dev Container Image
id: docker_push
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: ${{ github.event_name == 'push' }} && ${{ github.ref == 'refs/heads/main' }}
name: Container Push
uses: docker/build-push-action@v5
id: container-push
with:
push: true
cache-from: type=inline
context: docker
file: docker/Dockerfile
platforms: linux/amd64,linux/arm64
tags: 'ghcr.io/${{ github.repository_owner }}/devcontainer:latest'
tags: "ghcr.io/${{ steps.repository.outputs.lowercase }}:latest,ghcr.io/${{ steps.repository.outputs.lowercase }}:${{ github.sha }}"

0 comments on commit a0a5f63

Please sign in to comment.