name: Kind 2 DockerHub

on:
  push:
    branches: [ master, develop ]

jobs:
  build-and-publish:
    if: github.repository == 'kind2-mc/kind2'
    runs-on: ubuntu-latest

    steps:
    - name: Checkout code
      uses: actions/checkout@v2

    - name: Docker meta
      id: meta
      run: |
        image=kind2/kind2
        echo "::set-output name=image::$image"
        tag=${{ github.ref == 'refs/heads/master' && 'latest' || 'dev' }}
        echo "::set-output name=tag::$image:$tag"

    - name: Log in to Docker Hub
      uses: docker/login-action@v1
      with:
        username: ${{ secrets.DOCKER_USERNAME }}
        password: ${{ secrets.DOCKER_PASSWORD }}

    - name: Push to Docker Hub
      uses: docker/build-push-action@v2
      with:
        push: true
        file: docker/Dockerfile
        tags: ${{ steps.meta.outputs.tag }}
    
    - name: Update repo description
      uses: peter-evans/dockerhub-description@v2
      with:
        username: ${{ secrets.DOCKERHUB_USERNAME }}
        password: ${{ secrets.DOCKERHUB_PASSWORD }}
        repository: ${{ steps.meta.outputs.image }}
        readme-filepath: ./docker/README.md

name: Kind 2 DockerHub

on:
  push:
    branches: [ master, develop ]

jobs:
  build-and-publish:
    if: github.repository == 'kind2-mc/kind2'
    runs-on: ubuntu-latest

    steps:
    - name: Checkout code
      uses: actions/checkout@v2

    - name: Docker meta
      id: meta
      run: |
        image=kind2/kind2
        echo "::set-output name=image::$image"
        tag=${{ github.ref == 'refs/heads/master' && 'latest' || 'dev' }}
        echo "::set-output name=tag::$image:$tag"

    - name: Log in to Docker Hub
      uses: docker/login-action@v1
      with:
        username: ${{ secrets.DOCKER_USERNAME }}
        password: ${{ secrets.DOCKER_PASSWORD }}

    - name: Push to Docker Hub
      uses: docker/build-push-action@v2
      with:
        push: true
        file: docker/Dockerfile
        tags: ${{ steps.meta.outputs.tag }}
    
    - name: Update repo description
      uses: peter-evans/dockerhub-description@v2
      with:
        username: ${{ secrets.DOCKER_USERNAME }}
        password: ${{ secrets.DOCKER_PASSWORD }}
        repository: ${{ steps.meta.outputs.image }}
        readme-filepath: ./docker/README.md

Fix secret ids in GitHub action
Fix secret ids in GitHub action
