Fix infinite recursion in buildImage with default tag #568
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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
types: [ opened, reopened, labeled, synchronize ] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
linter: | |
- golangci-lint | |
steps: | |
- name: Clear cache | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
console.log("About to clear") | |
const caches = await github.rest.actions.getActionsCacheList({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
}) | |
for (const cache of caches.data.actions_caches) { | |
console.log(cache) | |
github.rest.actions.deleteActionsCacheById({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
cache_id: cache.id, | |
}) | |
} | |
console.log("Clear completed") | |
# - uses: actions/checkout@v4 | |
# - name: Setup Nix | |
# uses: ./.github/actions/setup-nix | |
# - name: Run linter | |
# run: nix run .#lint-${{ matrix.linter }} | |
# build: | |
# runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# package: | |
# - nix-snapshotter | |
# - image-hello | |
# - image-redis | |
# - image-redisWithShell | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Setup Nix | |
# uses: ./.github/actions/setup-nix | |
# - name: Build package | |
# run: nix build .#${{ matrix.package }} | |
# integration-test: | |
# runs-on: nix-snapshotter-runner | |
# strategy: | |
# matrix: | |
# test: | |
# - snapshotter | |
# - kubernetes | |
# - k3s | |
# - k3s-external | |
# - k3s-rootless | |
# - gvisor | |
# needs: [lint, build] | |
# if: contains(github.event.pull_request.labels.*.name, 'ok-to-test') | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Setup Nix | |
# uses: ./.github/actions/setup-nix | |
# with: | |
# enable-kvm: true | |
# - name: Build snapshotter | |
# run: nix build | |
# - name: Run integration tests | |
# run: nix run -L .#test-${{ matrix.test }} | |
# - uses: actions/upload-artifact@v4 | |
# with: | |
# name: ${{ matrix.test }}_build | |
# path: build | |
# if-no-files-found: ignore | |
# retention-days: 1 | |
# coverage-report: | |
# runs-on: ubuntu-latest | |
# needs: [integration-test] | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: actions/download-artifact@v4 | |
# with: | |
# path: build | |
# merge-multiple: true | |
# - uses: actions/setup-go@v4 | |
# with: { go-version: '1.20' } | |
# - name: Collect test coverage | |
# run: | | |
# mkdir -p "$PWD/build/go-cover/unit" | |
# go test -cover ./... -args -test.gocoverdir="$PWD/build/go-cover/unit" | |
# go tool covdata textfmt -i=`find ./build/go-cover -mindepth 1 -type d | paste -sd ","` -o ./build/go-cover/profile | |
# echo "# Coverage report" >> $GITHUB_STEP_SUMMARY | |
# echo '```' >> $GITHUB_STEP_SUMMARY | |
# go tool cover -func ./build/go-cover/profile >> $GITHUB_STEP_SUMMARY | |
# echo '```' >> $GITHUB_STEP_SUMMARY |