Skip to content

Updating to 7.0

Updating to 7.0 #12

name: Build and Publish Docker Images
on:
push:
branches:
- main
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build and Publish Docker Images
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
for dir in */; do
dir=${dir%*/}
image_name=dapr-microservices/$(echo $dir | tr '[:upper:]' '[:lower:]' | tr -d '[:space:]')
repo_owner=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
tag=${{ github.sha }}
docker buildx build -t ghcr.io/${{ github.repository }}/$image_name:$tag -f ./$dir/Dockerfile ./$dir -o type=registry,registry.insecure=true
done
done
env:
BUILDKIT_INLINE_CACHE: 1