Skip to content

Commit

Permalink
Fix CI for pull_request event
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Sevilla <[email protected]>
  • Loading branch information
rsevilla87 committed Aug 8, 2021
1 parent cb2e3d9 commit 8a2b4a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
19 changes: 5 additions & 14 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,17 @@ jobs:
go-version: ${{matrix.golang-version}}
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: branch
run: echo ${GITHUB_REF}

- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/checkout@v2

- name: Cache prometheus
uses: actions/cache@v2
with:
path: /prometheus-2.22.0.linux-amd64
path: prometheus-2.22.0.linux-amd64
key: prometheus

- name: Download prometheus
run: |
[[ ! -f prometheus-2.22.0.linux-amd64/prometheus ]] && curl -sSL https://github.com/prometheus/prometheus/releases/download/v2.22.0/prometheus-2.22.0.linux-amd64.tar.gz | tar xz
[[ -f prometheus-2.22.0.linux-amd64/prometheus ]] || curl -sSL https://github.com/prometheus/prometheus/releases/download/v2.22.0/prometheus-2.22.0.linux-amd64.tar.gz | tar xz
- name: Run prometheus
run: |
Expand All @@ -66,6 +55,8 @@ jobs:

- name: Build container images
run: make images
env:
VERSION: snapshot

- name: Install
run: sudo make install
Expand Down
2 changes: 1 addition & 1 deletion hack/tag_name.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

if [[ -z $(git branch --show-current) ]]; then
git describe --tags
git describe --tags --abbrev=0
else
git branch --show-current | sed 's/master/latest/g'
fi

0 comments on commit 8a2b4a5

Please sign in to comment.