From e27008ecb1e8e0daac2b35b8ee80cee6e31c0698 Mon Sep 17 00:00:00 2001 From: Timo Behrendt Date: Mon, 1 Apr 2024 14:52:28 +0200 Subject: [PATCH] Revert "refactor: add sharable action to setup go" This reverts commit 07412bf6c697bb97d27dc99e4797fe2b6ed9607c. --- .gitea/actions/setup_go_from_cache.yaml | 43 ------------------------- .gitea/workflows/ci.yaml | 22 +++++++++++-- 2 files changed, 20 insertions(+), 45 deletions(-) delete mode 100644 .gitea/actions/setup_go_from_cache.yaml diff --git a/.gitea/actions/setup_go_from_cache.yaml b/.gitea/actions/setup_go_from_cache.yaml deleted file mode 100644 index e51560c..0000000 --- a/.gitea/actions/setup_go_from_cache.yaml +++ /dev/null @@ -1,43 +0,0 @@ -# Re-Usable action that setups go from cache. Can be used in e.g. workflows/ci.yaml -# setups go from cache or installs go if not found in cache -# also updates the cache - -name: setup_go_from_cache -description: 'Setup go from cache' - -inputs: - go-version-file: - description: 'Path to go version file' - required: true - check-latest: - description: 'Check for latest go version' - required: false - default: 'true' - -runs: - using: 'composite' - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup go - uses: actions/setup-go@v5 - with: - go-version-file: ${{ inputs.go-version-file }} - check-latest: ${{ inputs.check-latest }} - - name: Create cache key - id: hash-go - uses: https://gitea.com/actions/go-hashfiles@v0.0.1 - with: - patterns: | - go.mod - go.sum - - name: cache go - id: cache-go - uses: actions/cache@v4 - with: - path: | - /go_path - /go_cache - key: go_path-${{ steps.hash-go.outputs.hash }} - restore-keys: |- - go_cache-${{ steps.hash-go.outputs.hash }} diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 50eebca..97cf4ac 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -14,10 +14,28 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: setup_go_from_cache - uses: ./.gitea/actions/setup_go_from_cache + - name: Setup go + uses: actions/setup-go@v5 with: go-version-file: go.mod + check-latest: true + - name: Create cache key + uses: https://gitea.com/actions/go-hashfiles@v0.0.1 + id: hash-go + with: + patterns: | + go.mod + go.sum + - name: cache go + id: cache-go + uses: actions/cache@v4 + with: + path: | + /go_path + /go_cache + key: go_path-${{ steps.hash-go.outputs.hash }} + restore-keys: |- + go_cache-${{ steps.hash-go.outputs.hash }} - name: build run: make build - name: test