diff --git a/.github/workflows/base.yml b/.github/workflows/base.yml index b2c60ed9..0c7553ab 100644 --- a/.github/workflows/base.yml +++ b/.github/workflows/base.yml @@ -59,7 +59,10 @@ jobs: cache-to: type=gha,mode=max - name: Run goss tests run: | - GOSS_FILE=goss_base.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10 + echo "os: ubuntu" >goss_vars_${GH_RUNNER_IMAGE}.yaml + echo "oscodename: ${{ matrix.release }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml + echo "arch: ${{ matrix.platform }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml + GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_base.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10 debian_base_tests: runs-on: ubuntu-latest @@ -108,7 +111,10 @@ jobs: cache-to: type=gha,mode=max - name: Run goss tests run: | - GOSS_FILE=goss_base.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10 + echo "os: debian" >goss_vars_${GH_RUNNER_IMAGE}.yaml + echo "oscodename: ${{ matrix.release }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml + echo "arch: ${{ matrix.platform }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml + GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_base.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10 ubuntu_base_latest_deploy: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b717e432..034ccf9d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -60,10 +60,14 @@ jobs: platforms: ${{ matrix.platform }} cache-from: type=gha cache-to: type=gha,mode=max + # Tests will run against the final `${GH_RUNNER_IMAGE}` laid on top of `base-${GH_RUNNER_IMAGE}` - name: Run goss tests run: | - GOSS_FILE=goss_base.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10 - GOSS_FILE=goss_full.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep \ + echo "os: ubuntu" >goss_vars_${GH_RUNNER_IMAGE}.yaml + echo "oscodename: ${{ matrix.release }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml + echo "arch: ${{ matrix.platform }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml + GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_base.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10 + GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_full.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep \ -e DEBUG_ONLY=true \ -e RUNNER_NAME=huzzah \ -e REPO_URL=https://github.com/myoung34/docker-github-actions-runner \ @@ -134,8 +138,11 @@ jobs: # Tests will run against the final `${GH_RUNNER_IMAGE}` laid on top of `base-${GH_RUNNER_IMAGE}` - name: Run goss tests run: | - GOSS_FILE=goss_base.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10 - GOSS_FILE=goss_full.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep \ + echo "os: debian" >goss_vars_${GH_RUNNER_IMAGE}.yaml + echo "oscodename: ${{ matrix.release }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml + echo "arch: ${{ matrix.platform }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml + GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_base.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10 + GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_full.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep \ -e DEBUG_ONLY=true \ -e RUNNER_NAME=huzzah \ -e REPO_URL=https://github.com/myoung34/docker-github-actions-runner \ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c183cbb2..49f50a42 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,8 +66,11 @@ jobs: # Tests will run against the final `${GH_RUNNER_IMAGE}` laid on top of `base-${GH_RUNNER_IMAGE}` - name: Run goss tests run: | - GOSS_FILE=goss_base.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10 - GOSS_FILE=goss_full.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep \ + echo "os: ubuntu" >goss_vars_${GH_RUNNER_IMAGE}.yaml + echo "oscodename: ${{ matrix.release }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml + echo "arch: ${{ matrix.platform }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml + GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_base.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10 + GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_full.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep \ -e DEBUG_ONLY=true \ -e RUNNER_NAME=huzzah \ -e REPO_URL=https://github.com/myoung34/docker-github-actions-runner \ @@ -142,8 +145,11 @@ jobs: # Tests will run against the final `${GH_RUNNER_IMAGE}` laid on top of `base-${GH_RUNNER_IMAGE}` - name: Run goss tests run: | - GOSS_FILE=goss_base.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10 - GOSS_FILE=goss_full.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep \ + echo "os: debian" >goss_vars_${GH_RUNNER_IMAGE}.yaml + echo "oscodename: ${{ matrix.release }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml + echo "arch: ${{ matrix.platform }}" >>goss_vars_${GH_RUNNER_IMAGE}.yaml + GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_base.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true ${GH_RUNNER_IMAGE} 10 + GOSS_VARS=goss_vars_${GH_RUNNER_IMAGE}.yaml GOSS_FILE=goss_full.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep \ -e DEBUG_ONLY=true \ -e RUNNER_NAME=huzzah \ -e REPO_URL=https://github.com/myoung34/docker-github-actions-runner \ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 82fad4bc..a3c103ee 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,6 +3,7 @@ repos: rev: v4.3.0 hooks: - id: check-yaml + exclude: goss_[a-z]*.yaml - id: end-of-file-fixer - id: trailing-whitespace - id: check-case-conflict diff --git a/goss_base.yaml b/goss_base.yaml index 22b9b5a6..7d3f4b7b 100644 --- a/goss_base.yaml +++ b/goss_base.yaml @@ -33,6 +33,15 @@ package: installed: true yq: installed: false + # Ubuntu Focal is the only one currently that doesnt have an official upstream skopeo/buildah/podman + {{ if not (eq .Vars.oscodename "focal") }} + skopeo: + installed: true + buildah: + installed: true + podman: + installed: true + {{ end }} file: /usr/bin/gh: exists: true