Skip to content

Merge pull request #106 from jetstack/empty-config-crash #24

Merge pull request #106 from jetstack/empty-config-crash

Merge pull request #106 from jetstack/empty-config-crash #24

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
jobs:
goreleaser:
runs-on: ubuntu-latest
env:
GOPRIVATE: github.com/jetstack/*
steps:
- name: Configure private repo pull access
# the following configuration will grant this action permissions to pull
# that contents of that private repos using the deploy keys in the repo secrets
run: |
mkdir ~/.ssh
chmod 700 ~/.ssh
echo "${{ secrets.DEPLOY_KEY_READ_JS_OPERATOR }}" > ~/.ssh/js_operator_id
echo "${{ secrets.DEPLOY_KEY_READ_VENAFI_ENHANCED_ISSUER }}" > ~/.ssh/venafi_enhanced_issuer_id
echo "${{ secrets.DEPLOY_KEY_READ_EXTERNAL_ISSUER_LIB }}" > ~/.ssh/external_issuer_lib_id
chmod 600 ~/.ssh/venafi_enhanced_issuer_id
chmod 600 ~/.ssh/external_issuer_lib_id
chmod 600 ~/.ssh/js_operator_id
cat <<EOT >> ~/.ssh/config
Host js-operator.github.com
HostName github.com
IdentityFile ~/.ssh/js_operator_id
IdentitiesOnly yes
EOT
cat <<EOT >> ~/.ssh/config
Host venafi-enhanced-issuer.github.com
HostName github.com
IdentityFile ~/.ssh/venafi_enhanced_issuer_id
IdentitiesOnly yes
EOT
cat <<EOT >> ~/.ssh/config
Host external-issuer-lib.github.com
HostName github.com
IdentityFile ~/.ssh/external_issuer_lib_id
IdentitiesOnly yes
EOT
cat <<EOT >> ~/.gitconfig
[url "[email protected]:jetstack/js-operator"]
insteadOf = https://github.com/jetstack/js-operator
[url "[email protected]:jetstack/venafi-enhanced-issuer"]
insteadOf = https://github.com/jetstack/venafi-enhanced-issuer
[url "[email protected]:jetstack/external-issuer-lib"]
insteadOf = https://github.com/jetstack/external-issuer-lib
EOT
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
- name: Checkout
uses: actions/checkout@v3
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up cache
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}