fix: Updates to taskfiles and e2e workflow #42
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: "e2e" | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: ["main"] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
e2e-paru: | |
name: e2e-paru | |
runs-on: ubuntu-latest | |
container: | |
image: greyltc/archlinux-aur:paru | |
options: --user root | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# - name: Set Permissions | |
# shell: bash | |
# run: | | |
# sudo chown -R 973:973 $GITHUB_WORKSPACE | |
# sudo chmod -R 777 $GITHUB_WORKSPACE | |
- name: Test Arch dependencies | |
shell: bash | |
run: >- | |
sudo -E -u ab -D~ bash -c ' | |
cd $GITHUB_WORKSPACE; | |
paru -Syu --noconfirm --noprogressbar go-task; | |
ls -la; | |
cat .taskfiles/Workstation/ArchPackages; | |
go-task workstation:paru | |
' | |
e2e-configure: | |
name: e2e-configure | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Homebrew | |
id: setup-homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
id: setup-python | |
with: | |
python-version: "3.12" | |
- name: Cache homebrew packages | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: actions/cache@v3 | |
id: cache-homebrew-packages | |
with: | |
key: homebrew-${{ runner.os }}-${{ steps.setup-homebrew.outputs.gems-hash }}-${{ hashFiles('.taskfiles/Workstation/Brewfile') }} | |
path: /home/linuxbrew/.linuxbrew | |
- name: Cache venv | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: actions/cache@v3 | |
with: | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('requirements.txt', 'requirements.yaml') }} | |
path: .venv | |
- name: Setup Workflow Tools | |
if: ${{ github.event_name == 'pull_request' && steps.cache-homebrew-packages.outputs.cache-hit != 'true' }} | |
shell: bash | |
run: brew install go-task | |
- name: Install Brew dependencies | |
if: ${{ github.event_name == 'pull_request' && steps.cache-homebrew-packages.outputs.cache-hit != 'true' }} | |
shell: bash | |
run: task workstation:brew | |
- name: Initialize Direnv | |
shell: bash | |
run: direnv allow . | |
- name: Initialize Sops Age key | |
shell: bash | |
run: task sops:age-keygen | |
- name: Install Ansible dependencies | |
shell: bash | |
run: task ansible:deps force=false | |
- name: Generate bootstrap config file | |
shell: bash | |
run: | | |
task init | |
cp ./.github/tests/config.yaml ./bootstrap/vars/config.yaml | |
cp ./.github/tests/addons.yaml ./bootstrap/vars/addons.yaml | |
export BOOTSTRAP_AGE_PUBLIC_KEY=$(sed -n 's/# public key: //gp' age.key) | |
envsubst < ./bootstrap/vars/config.yaml | sponge ./bootstrap/vars/config.yaml | |
- name: Run configure | |
shell: bash | |
run: task --yes configure | |
- name: Run kubeconform | |
shell: bash | |
run: ./scripts/kubeconform.sh ./kubernetes | |
- name: List Hosts with Ansible | |
shell: bash | |
run: task ansible:list | |
- name: Run repo clean and reset | |
shell: bash | |
run: | | |
task repo:clean | |
task --yes repo:reset |