diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml new file mode 100644 index 0000000..c3a6913 --- /dev/null +++ b/.github/workflows/build-docker.yml @@ -0,0 +1,20 @@ +name: Build Docker Image + +on: + push: + branches: [main] + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + - uses: docker/build-push-action@v5 + with: + context: . + push: false + tags: dotfiles + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/.github/workflows/install-dotfiles.yml b/.github/workflows/install-dotfiles.yml deleted file mode 100644 index 8768d70..0000000 --- a/.github/workflows/install-dotfiles.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: 'Fresh install dotfiles' - -on: - workflow_dispatch: - push: - branches: - - main - pull_request: - -permissions: - contents: read - pull-requests: read -concurrency: - group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' - cancel-in-progress: true - -env: - HOMEBREW_NO_ANALYTICS: 1 - -jobs: - install-dotfiles: - strategy: - matrix: - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} - steps: - - name: Checkout - id: checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Cache Homebrew - id: cache-homebrew - uses: actions/cache@v4 - if: runner.os != 'macOS' - with: - path: | - /home/linuxbrew/.linuxbrew - key: ${{ runner.os }}-${{ hashFiles('**/Brewfile', '**/Brewfile.lock.json') }}-homebrew - - - name: Cache asdf - id: cache-asdf - uses: actions/cache@v4 - with: - path: | - ~/.asdf - key: ${{ runner.os }}-${{ hashFiles('**/asdf/tool-versions') }}-asdf - - - name: Bootstrap dotfiles - id: bootstrap-dotfiles - run: | - # symlink the dotfiles to the current users home directory - ln -sf $GITHUB_WORKSPACE $HOME/.dotfiles - ./bootstrap - - - name: Setup Homebrew env - id: setup-homebrew-env - if: runner.os != 'macOS' - run: | - # add all relevant env to github actions env - eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" - echo "HOMEBREW_PREFIX=$HOMEBREW_PREFIX" >> "$GITHUB_ENV" - echo "HOMEBREW_CELLAR=$HOMEBREW_CELLAR" >> "$GITHUB_ENV" - echo "HOMEBREW_REPOSITORY=$HOMEBREW_REPOSITORY" >> "$GITHUB_ENV" - echo "$HOMEBREW_PREFIX/bin:$HOMEBREW_PREFIX/sbin" >> "$GITHUB_PATH" - - - name: Verify - id: verify - if: runner.os != 'macOS' - shell: zsh {0} - env: - TERM: xterm-256color - run: ./doctor --nvim