Skip to content

first commit

first commit #2

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
# schedule:
# - cron: "0 6 * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: '1.20'
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Install yq
run: |
curl -fsSL -o yq https://github.com/mikefarah/yq/releases/download/3.3.0/yq_linux_amd64
chmod +x yq
sudo mv yq /usr/local/bin/yq
- name: Install Kubernetes CLI
run: |
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.21.0/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
- name: Install gomod-gen
run: |
curl -fsSL -O https://github.com/appscodelabs/gomod-gen/releases/download/v0.1.3/gomod-gen-linux-amd64
chmod +x gomod-gen-linux-amd64
sudo mv gomod-gen-linux-amd64 /usr/local/bin/gomod-gen
- name: Prepare git
env:
GITHUB_USER: 1gtm
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
run: |
set -x
git config --global user.name "1gtm"
git config --global user.email "[email protected]"
git config --global \
url."https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com".insteadOf \
"https://github.com"
# git remote set-url origin https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
- name: Prepare Go for private repos
run: |
go env -w GOPRIVATE=go.appscode.dev/*,github.com/appscode/*,kubedb.dev/*
- name: Install GitHub CLI
run: |
curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1
sudo mv bin/hub /usr/local/bin
- name: Refresh repositories
env:
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
run: |
./refresh-repo.sh repos.txt