Skip to content

Commit

Permalink
feat(docker): configure docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Ameausoone committed Oct 16, 2024
1 parent 6e3698e commit a6efcb2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 37 deletions.
44 changes: 11 additions & 33 deletions .github/workflows/all-in-one-linter.yaml
Original file line number Diff line number Diff line change
@@ -1,51 +1,29 @@
---
#################################
#################################
## Super Linter GitHub Actions ##
#################################
#################################
name: Lint Code Base
name: Check code with pre-commit

#
# Documentation:
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
#

#############################
# Start the job on all push #
#############################
on:
push:

###############
# Set the Job #
###############
jobs:
build:
# Name the Job
name: Lint Code Base
name: Run pre-commit
# Set the agent to run on
runs-on: ubuntu-latest

##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name:
uses: actions/setup-python@v2
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
python-version: '3.x'

################################
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter/slim@v4
env:
VALIDATE_ALL_CODEBASmac-dev-playbook/tasks/packages.yml: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run pre-commit
run: |
python -m pip install --upgrade pip
pip install pre-commit
pre-commit run --all-files --show-diff-on-failure
1 change: 1 addition & 0 deletions roles/mac_dev_playbook/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ npm_installed_packages:
- tldr # tldr is a community driven documentation for the command line
- yarn # yarn is a package manager for JavaScript
- editorconfig # editorconfig is a plugin for your code editor that helps enforce consistent coding styles
- "@devcontainers/cli" # devcontainers is a command line tool for managing devcontainers

# FIXME Use directly .tool-versions
asdf_plugins:
Expand Down
11 changes: 7 additions & 4 deletions roles/mac_dev_playbook/tasks/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
# mkdir -p ~/.docker/cli-plugins
# ln -sfn /usr/local/opt/docker-buildx/bin/docker-buildx ~/.docker/cli-plugins/docker-buildx

- name: Create directory for buildx
- name: Create directory for docker plugins
ansible.builtin.file:
path: "{{ ansible_env.HOME }}/.docker/cli-plugins"
mode: '0777'
state: directory

- name: Create symbolic link for buildx
- name: Create symbolic links for docker plugins
ansible.builtin.file:
src: /usr/local/opt/docker-buildx/bin/docker-buildx
dest: "{{ ansible_env.HOME }}/.docker/cli-plugins/docker-buildx"
src: "{{ item }}"
dest: "{{ ansible_env.HOME }}/.docker/cli-plugins/{{ item | basename }}"
state: link
with_fileglob:
- /usr/local/opt/docker-buildx/bin/docker-buildx
- /usr/local/opt/docker-compose/bin/docker-compose

0 comments on commit a6efcb2

Please sign in to comment.