diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index f2a96f5dce5..2fde4088392 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -14,10 +14,6 @@ on: - "**.md" - "LICENSE" -env: - REGISTRY: ghcr.io - IMAGE_NAME: ibc-go-simd - jobs: determine-image-tag: if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} @@ -31,9 +27,14 @@ jobs: go-version: 1.18 - id: get-tag run: | - tag=$(go run cmd/determine_simd_tag/main.go -pr "${{ github.event.pull_request.number }}" ) - echo "Using tag $tag" - echo "simd-tag=$tag" >> $GITHUB_OUTPUT + if [ -z "${{ github.event.pull_request.number }}" ] + then + echo "simd-tag=main" >> $GITHUB_OUTPUT + else + tag="pr-${{ github.event.pull_request.number }}" + echo "Using tag $tag" + echo "simd-tag=$tag" >> $GITHUB_OUTPUT + fi e2e: if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} needs: diff --git a/cmd/determine_simd_tag/main.go b/cmd/determine_simd_tag/main.go deleted file mode 100644 index e7b5d718194..00000000000 --- a/cmd/determine_simd_tag/main.go +++ /dev/null @@ -1,26 +0,0 @@ -package main - -import ( - "flag" - "fmt" -) - -var prNum string - -func init() { - flag.StringVar(&prNum, "pr", "", "the number of the pr") - flag.Parse() -} - -// in the context of a GithubAction workflow, the PR is non empty if it is a pr. When -// code is merged to main, it will be empty. In this case we just use the "main" tag. -func main() { - fmt.Print(getSimdTag(prNum)) -} - -func getSimdTag(prNum string) string { - if prNum == "" { - return "main" - } - return fmt.Sprintf("pr-%s", prNum) -}