Skip to content

Commit

Permalink
Fix the Github build issue related to homebrew root detection
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinpinto committed Feb 27, 2024
1 parent fefa27c commit b66d44a
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 29 deletions.
29 changes: 16 additions & 13 deletions .github/workflows/latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,18 @@ jobs:
env:
UBUNTU_LTS_VERSION: "20.04"
steps:
- uses: "actions/[email protected]"
- name: "Free disk space"
uses: "jlumbroso/[email protected]"
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true

- uses: "actions/[email protected]"
with:
lfs: true
fetch-depth: 0
Expand All @@ -32,20 +43,20 @@ jobs:
run: echo "::set-output name=value::$(echo ${GITHUB_SHA::8})"

- name: "Set up QEMU"
uses: "docker/setup-qemu-action@v1.2.0"
uses: "docker/setup-qemu-action@v3"

- name: "Set up Docker Buildx"
uses: "docker/setup-buildx-action@v1.6.0"
uses: "docker/setup-buildx-action@v3"

- name: "Login to GitHub Container Registry"
uses: "docker/login-action@v1.12.0"
uses: "docker/login-action@v3.0.0"
with:
registry: "ghcr.io"
username: "${{ github.actor }}"
password: "${{ secrets.GITHUB_TOKEN }}"

- name: "Publish to GitHub Packages"
uses: "docker/build-push-action@v2.7.0"
uses: "docker/build-push-action@v5"
with:
context: .
file: "./Dockerfile"
Expand All @@ -56,11 +67,3 @@ jobs:
tags: |
ghcr.io/marvinpinto/kitchensink:${{ env.UBUNTU_LTS_VERSION }}-latest
ghcr.io/marvinpinto/kitchensink:${{ env.UBUNTU_LTS_VERSION }}-${{ steps.sha.outputs.value }}
- uses: "marvinpinto/action-keybase-notifications@latest"
if: always()
with:
job_status: ${{ job.status }}
on_success: "never"
on_failure: "always"
opensentinel_token: ${{ secrets.OSL_TOKEN }}
27 changes: 15 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,18 @@ jobs:
env:
UBUNTU_LTS_VERSION: "20.04"
steps:
- uses: "actions/[email protected]"
- name: "Free disk space"
uses: "jlumbroso/[email protected]"
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true

- uses: "actions/[email protected]"
with:
lfs: true
fetch-depth: 0
Expand All @@ -22,13 +33,13 @@ jobs:
run: echo "::set-output name=value::$(echo ${GITHUB_SHA::8})"

- name: "Set up QEMU"
uses: "docker/setup-qemu-action@v1.2.0"
uses: "docker/setup-qemu-action@v3"

- name: "Set up Docker Buildx"
uses: "docker/setup-buildx-action@v1.6.0"
uses: "docker/setup-buildx-action@v3"

- name: "Publish to GitHub Packages"
uses: "docker/build-push-action@v2.7.0"
uses: "docker/build-push-action@v5"
with:
context: .
file: "./Dockerfile"
Expand All @@ -39,11 +50,3 @@ jobs:
tags: |
ghcr.io/marvinpinto/kitchensink:${{ env.UBUNTU_LTS_VERSION }}-latest
ghcr.io/marvinpinto/kitchensink:${{ env.UBUNTU_LTS_VERSION }}-${{ steps.sha.outputs.value }}
- uses: "marvinpinto/action-keybase-notifications@latest"
if: always()
with:
job_status: ${{ job.status }}
on_success: "never"
on_failure: "always"
opensentinel_token: ${{ secrets.OSL_TOKEN }}
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ ARG UBUNTU_VERSION=20.04
FROM ubuntu:${UBUNTU_VERSION}
LABEL org.opencontainers.image.source https://github.com/marvinpinto/kitchensink

# Manually add a /.dockerenv file (to work around buildx not providing it)
RUN touch /.dockerenv

# Base utilities
RUN apt-get -qq update \
&& apt-get install -y \
Expand Down Expand Up @@ -35,7 +38,6 @@ RUN eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" \
&& brew install gcc git ansible chezmoi \
&& brew tap marvinpinto/kitchensink "https://github.com/marvinpinto/kitchensink.git" \
&& brew install \
marvinpinto/kitchensink/op \
aws-vault \
cheat \
fzf \
Expand All @@ -46,10 +48,9 @@ RUN eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" \
neovim \
rclone \
jq \
go@1.17 \
go@1.22 \
nvm \
terraform \
packer \
python \
openjdk@11 \
maven \
Expand All @@ -62,7 +63,7 @@ RUN eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" \
awscli \
git-delta \
yarn-completion \
gcc@5 \
gcc@13 \
the_silver_searcher

# Configure timezone and locale
Expand Down
1 change: 1 addition & 0 deletions dotfiles/dot_bash.d/kitchensink.tmpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- /* vim: set filetype=sh : */ -}}
{{- if (eq .chezmoi.os "linux") -}}
# Bash function to attach to, or spin up a new (named) docker container
function sink() {
Expand Down

0 comments on commit b66d44a

Please sign in to comment.