name: dotfiles
on: push

jobs:
  archlinux:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Build and push Docker images
        uses: docker/build-push-action@v1
        with:
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}
          repository: ${{ github.actor }}/dotfiles/archlinux-dotfiles
          registry: docker.pkg.github.com
          tag_with_ref: true
          tag_with_sha: true
  osx:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v2
      - name: Cache homebrew packages
        uses: actions/cache@v2
        env:
          cache-name: cache-installed-packages
        with:
          path: |
            $HOME/Library/Caches/Homebrew
            $HOME/.pyenv
            $HOME/Library/Caches/pip
            /usr/local/Caskroom
            /usr/local/opt
          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**') }}
          restore-keys: |
            ${{ runner.os }}-build-${{ env.cache-name }}-
            ${{ runner.os }}-build-
            ${{ runner.os }}-
      - name: Homebrew cleanup
        run: brew cleanup
      - name: Install Ansible
        run: brew install ansible
      - name: Install Ansible galaxies
        run: ansible-galaxy install -r requirements.yml
      - name: Run Ansible
        run: ansible-playbook -i inventory osx.yml

name: dotfiles
on: push

jobs:
  archlinux:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Build and push Docker images
        uses: docker/build-push-action@v1
        with:
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.GITHUB_TOKEN }}
          repository: benmezger/dotfiles
          registry: docker.pkg.github.com
          tag_with_ref: true
          tag_with_sha: true
  osx:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v2
      - name: Cache homebrew packages
        uses: actions/cache@v2
        env:
          cache-name: cache-installed-packages
        with:
          path: |
            $HOME/Library/Caches/Homebrew
            $HOME/.pyenv
            $HOME/Library/Caches/pip
            /usr/local/Caskroom
            /usr/local/opt
          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**') }}
          restore-keys: |
            ${{ runner.os }}-build-${{ env.cache-name }}-
            ${{ runner.os }}-build-
            ${{ runner.os }}-
      - name: Homebrew cleanup
        run: brew cleanup
      - name: Install Ansible
        run: brew install ansible
      - name: Install Ansible galaxies
        run: ansible-galaxy install -r requirements.yml
      - name: Run Ansible
        run: ansible-playbook -i inventory osx.yml

Revert "Chore: Fix Docker's GH name requirement"
Revert "Chore: Fix Docker's GH name requirement"

This reverts commit 5c851a31a689c2322a088c2664b9d719494fdc5d.
