Skip to content

Commit

Permalink
Adds setup composite action (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
tdstein authored Oct 20, 2023
1 parent 5ff5ba2 commit 52952c4
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 98 deletions.
25 changes: 25 additions & 0 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Setup
description: "Sets up the workflow"
runs:
using: "composite"
steps:
- uses: crazy-max/ghaction-github-runtime@v3
- uses: extractions/setup-just@v1
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: actions/cache@v3
with:
path: var-cache-apt
key: var-cache-apt-${{ hashFiles('./build/ci/Dockerfile') }}
- uses: reproducible-containers/[email protected]
with:
cache-source: var-cache-apt
cache-target: /var/cache/apt
- uses: actions/cache@v3
with:
path: var-lib-apt
key: var-lib-apt-${{ hashFiles('./build/ci/Dockerfile') }}
- uses: reproducible-containers/[email protected]
with:
cache-source: var-lib-apt
cache-target: /var/lib/apt
21 changes: 1 addition & 20 deletions .github/workflows/agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,9 @@ jobs:
agent:
runs-on: ubuntu-latest
steps:
- uses: crazy-max/ghaction-github-runtime@v3
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: extractions/setup-just@v1
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: actions/cache@v3
with:
path: var-cache-apt
key: var-cache-apt-${{ hashFiles('./build/ci/Dockerfile') }}
- uses: reproducible-containers/[email protected]
with:
cache-source: var-cache-apt
cache-target: /var/cache/apt
- uses: actions/cache@v3
with:
path: var-lib-apt
key: var-lib-apt-${{ hashFiles('./build/ci/Dockerfile') }}
- uses: reproducible-containers/[email protected]
with:
cache-source: var-lib-apt
cache-target: /var/lib/apt
- uses: ./.github/actions/setup
- run: just lint
- run: just test
23 changes: 1 addition & 22 deletions .github/workflows/bats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,12 @@ jobs:
- run: chmod -R +x ./bin
- run: just bats
docker:
env:
DOCKER: true
runs-on: ubuntu-latest
steps:
- uses: crazy-max/ghaction-github-runtime@v3
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: extractions/setup-just@v1
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: actions/cache@v3
with:
path: var-cache-apt
key: var-cache-apt-${{ hashFiles('./build/ci/Dockerfile') }}
- uses: reproducible-containers/[email protected]
with:
cache-source: var-cache-apt
cache-target: /var/cache/apt
- uses: actions/cache@v3
with:
path: var-lib-apt
key: var-lib-apt-${{ hashFiles('./build/ci/Dockerfile') }}
- uses: reproducible-containers/[email protected]
with:
cache-source: var-lib-apt
cache-target: /var/lib/apt
- uses: ./.github/actions/setup
- uses: actions/download-artifact@v3
with:
name: executables
Expand Down
21 changes: 1 addition & 20 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: crazy-max/ghaction-github-runtime@v3
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: extractions/setup-just@v1
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: actions/cache@v3
with:
path: var-cache-apt
key: var-cache-apt-${{ hashFiles('./build/ci/Dockerfile') }}
- uses: reproducible-containers/[email protected]
with:
cache-source: var-cache-apt
cache-target: /var/cache/apt
- uses: actions/cache@v3
with:
path: var-lib-apt
key: var-lib-apt-${{ hashFiles('./build/ci/Dockerfile') }}
- uses: reproducible-containers/[email protected]
with:
cache-source: var-lib-apt
cache-target: /var/lib/apt
- uses: ./.github/actions/setup
- run: just web install
- run: just web build
- run: just build
Expand Down
21 changes: 1 addition & 20 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,8 @@ jobs:
image:
runs-on: ubuntu-latest
steps:
- uses: crazy-max/ghaction-github-runtime@v3
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: extractions/setup-just@v1
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: actions/cache@v3
with:
path: var-cache-apt
key: var-cache-apt-${{ hashFiles('./build/ci/Dockerfile') }}
- uses: reproducible-containers/[email protected]
with:
cache-source: var-cache-apt
cache-target: /var/cache/apt
- uses: actions/cache@v3
with:
path: var-lib-apt
key: var-lib-apt-${{ hashFiles('./build/ci/Dockerfile') }}
- uses: reproducible-containers/[email protected]
with:
cache-source: var-lib-apt
cache-target: /var/lib/apt
- uses: ./.github/actions/setup
- run: just image
17 changes: 1 addition & 16 deletions .github/workflows/web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,10 @@ jobs:
web:
runs-on: ubuntu-latest
steps:
- uses: crazy-max/ghaction-github-runtime@v3
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: extractions/setup-just@v1
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: actions/cache@v3
with:
path: var-cache-apt
key: var-cache-apt-${{ hashFiles('./build/ci/Dockerfile') }}
- uses: reproducible-containers/[email protected]
with:
cache-source: var-cache-apt
cache-target: /var/cache/apt
- uses: actions/cache@v3
with:
path: var-lib-apt
key: var-lib-apt-${{ hashFiles('./build/ci/Dockerfile') }}
- uses: ./.github/actions/setup
- run: just web install
- run: just web lint
- run: just web test

0 comments on commit 52952c4

Please sign in to comment.