ci: install git-crypt

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2021-03-12 17:24:52 -08:00
parent 19b9ec2721
commit 5ccf617245

View File

@ -14,10 +14,26 @@ jobs:
- name: Check out - name: Check out
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends shellcheck git-crypt
export CUE_VERSION="$(grep cue ./go.mod | cut -d' ' -f2)"
export CUE_TARBALL="cue_${CUE_VERSION}_linux_amd64.tar.gz"
echo "Installing cue version $CUE_VERSION"
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sudo sh -s -- -b /usr/local/bin v1.23.8
curl -L https://github.com/cuelang/cue/releases/download/${CUE_VERSION}/${CUE_TARBALL} | sudo tar zxf - -C /usr/local/bin
- name: Unlock secrets - name: Unlock secrets
uses: sliteteam/github-action-git-crypt-unlock@1.2.0
env: env:
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }} GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}
run: |
echo "$GIT_CRYPT_KEY" | base64 -d > /tmp/git-crypt-key
git-crypt unlock /tmp/git-crypt-key
rm -f /tmp/git-crypt-key
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v1 uses: docker/login-action@v1
@ -31,19 +47,6 @@ jobs:
go-version: 1.16 go-version: 1.16
id: go id: go
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends shellcheck
export CUE_VERSION="$(grep cue ./go.mod | cut -d' ' -f2)"
export CUE_TARBALL="cue_${CUE_VERSION}_linux_amd64.tar.gz"
echo "Installing cue version $CUE_VERSION"
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sudo sh -s -- -b /usr/local/bin v1.23.8
curl -L https://github.com/cuelang/cue/releases/download/${CUE_VERSION}/${CUE_TARBALL} | sudo tar zxf - -C /usr/local/bin
- name: Lint - name: Lint
run: | run: |
make lint make lint