Skip to content

Commit

Permalink
feat(#141): migrate circleci config to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
meatwallace committed Dec 1, 2021
1 parent 78acdb4 commit d1bf492
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 159 deletions.
4 changes: 4 additions & 0 deletions .actrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-P ubuntu-latest=catthehacker/ubuntu:act-latest
-P ubuntu-20.04=catthehacker/ubuntu:act-20.04
-P ubuntu-18.04=catthehacker/ubuntu:act-18.04
ubuntu-16.04=catthehacker/ubuntu:act-16.04
1 change: 1 addition & 0 deletions .aliases
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ alias rm='rm -i -v'
alias cp='cp -v'
alias mkdir='mkdir -p -v'
alias emacs='emacs -nw'
alias act='act --env-file="$HOME/.config/act/.env"'

# single letter shortcuts to core commands
alias a=''
Expand Down
86 changes: 0 additions & 86 deletions .circleci/config.yml

This file was deleted.

Empty file added .config/act/.env
Empty file.
66 changes: 66 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
lint:
runs-on: ubuntu-latest
container: "koalaman/shellcheck-alpine:latest"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Run Shellcheck
# TODO(#35): fix bogus shellcheck errors in Github Actions
run: |
find . -type f -name '*.sh' | xargs shellcheck --external-sources --exclude=SC1091,SC2086
build:
runs-on: ubuntu-latest
strategy:
matrix:
distro: [alpine, arch]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Generate image tags
id: generate_image_tags
run: |
IMAGE_TAG_BASE="meatwallace/meatbox-${{ matrix.distro }}"
if [[ "${{ github.ref}}" = refs/heads/master ]]; then
TAGS="${IMAGE_TAG_BASE}:latest,"
fi
TAGS="$TAGS${IMAGE_TAG_BASE}:${{ github.sha }}"
echo "::set-output name=tags::${TAGS}"
- name: Log in to Dockerhub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build container image
uses: docker/build-push-action@v2
with:
push: ${{ github.event_name != 'pull_request' }}
file: ./scripts/${{ matrix.distro }}/Dockerfile
build-args: |
MEATBOX_USER: meatwallace
MEATBOX_PASSWORD: meatword
MEATBOX_CHECKOUT_SHA1: ${{ github.sha }}
tags: ${{ steps.generate_image_tags.outputs.tags }}

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# dotfiles

[![CircleCI](https://circleci.com/gh/meatwallace/dotfiles/tree/master.svg?style=svg)](https://circleci.com/gh/meatwallace/dotfiles/tree/master)
![Github Actions CI workflow status](https://github.com/meatwallace/dotfiles/actions/workflows/ci.yml/badge.svg?branch=master)

> **!!! READ ME !!!**
> there's currently a lot of outstanding issues with just about everything in
Expand Down
5 changes: 2 additions & 3 deletions scripts/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ RUN \
sqlite-dev \
unzip \
zlib-dev >/dev/null && \
# run our system setup script from our staging alias
curl "https://meatbox.meatwallace.now.sh" | MEATBOX_CHECKOUT_SHA1="${MEATBOX_CHECKOUT_SHA1}" bash && \
. "$HOME/.bashrc" && \
# run our system setup scripts
export PATH="$HOME/bin:$PATH" && \
meatbox bootstrap && \
. "$HOME/.bashrc" && \
meatbox setup && \
Expand Down
32 changes: 0 additions & 32 deletions scripts/alpine/build.sh

This file was deleted.

8 changes: 3 additions & 5 deletions scripts/arch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
###############################################################################
##############################################################################
# meatwallace/meatbox-arch
###
FROM archlinux/base:latest
FROM archlinux:latest

# specific to antergos setup when using the `base` installation
ARG USER_SUDOERS_FILE="10-user"
Expand Down Expand Up @@ -36,9 +36,7 @@ SHELL ["/bin/bash", "-c"]
ARG MEATBOX_CHECKOUT_SHA1

RUN \
# run our system setup script from our staging alias
curl "https://meatbox.meatwallace.now.sh" | MEATBOX_CHECKOUT_SHA1="${MEATBOX_CHECKOUT_SHA1}" bash && \
. "$HOME/.bashrc" && \
export PATH="$HOME/bin:$PATH" && \
meatbox bootstrap && \
. "$HOME/.bashrc" && \
meatbox setup && \
Expand Down
1 change: 1 addition & 0 deletions scripts/arch/Yayfile
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ veonim
visual-studio-code-insiders

# dev
act
google-cloud-sdk
watchman

Expand Down
32 changes: 0 additions & 32 deletions scripts/arch/build.sh

This file was deleted.

1 change: 1 addition & 0 deletions scripts/darwin/Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ brew 'neovim'
cask 'visual-studio-code-insiders'

# dev
brew 'act'
brew 'watchman'
# brew 'shellcheck'
#cask 'google-cloud-sdk'
Expand Down

0 comments on commit d1bf492

Please sign in to comment.