Skip to content

Commit 83a24f1

Browse files
committed
add GH actions
Signed-off-by: Tim Ramlot <[email protected]>
1 parent 29515dc commit 83a24f1

File tree

6 files changed

+116
-248
lines changed

6 files changed

+116
-248
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: 'Setup repo access'
2+
description: 'Setups authenticate to GitHub repos'
3+
inputs:
4+
DEPLOY_KEY_READ_VENAFI_CONNECTION_LIB:
5+
required: true
6+
description: "DEPLOY_KEY_READ_VENAFI_CONNECTION_LIB secret"
7+
outputs: {}
8+
runs:
9+
using: "composite"
10+
steps:
11+
- name: Configure jetstack/venafi-connection-lib repo pull access
12+
shell: bash
13+
run: |
14+
mkdir ~/.ssh
15+
chmod 700 ~/.ssh
16+
17+
echo "${{ inputs.DEPLOY_KEY_READ_VENAFI_CONNECTION_LIB }}" > ~/.ssh/venafi_connection_lib_id
18+
chmod 600 ~/.ssh/venafi_connection_lib_id
19+
20+
cat <<EOT >> ~/.ssh/config
21+
Host venafi-connection-lib.github.com
22+
HostName github.com
23+
IdentityFile ~/.ssh/venafi_connection_lib_id
24+
IdentitiesOnly yes
25+
EOT
26+
27+
cat <<EOT >> ~/.gitconfig
28+
[url "[email protected]:jetstack/venafi-connection-lib"]
29+
insteadOf = https://github.com/jetstack/venafi-connection-lib
30+
EOT
31+
32+
echo "GOPRIVATE=github.com/jetstack/venafi-connection-lib" >> $GITHUB_ENV

.github/workflows/chart-test.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/release-master.yml

Lines changed: 0 additions & 138 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 19 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
name: release
32
on:
43
push:
@@ -9,19 +8,21 @@ env:
98
VERSION: ${{ github.ref_name }}
109

1110
jobs:
12-
build_images:
11+
artifacts:
1312
runs-on: ubuntu-latest
1413

1514
permissions:
1615
contents: read # needed for checkout
17-
packages: write # needed for push images
18-
id-token: write # needed for keyless signing
19-
20-
env:
21-
GOPRIVATE: github.com/jetstack/venafi-connection-lib
16+
id-token: write # needed for keyless signing & google auth
2217

2318
steps:
2419
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- uses: ./.github/actions/repo_access
24+
with:
25+
DEPLOY_KEY_READ_VENAFI_CONNECTION_LIB: ${{ secrets.DEPLOY_KEY_READ_VENAFI_CONNECTION_LIB }}
2526

2627
- id: go-version
2728
run: |
@@ -31,33 +32,19 @@ jobs:
3132
with:
3233
go-version: ${{ steps.go-version.outputs.result }}
3334

34-
- name: Configure jetstack/venafi-connection-lib repo pull access
35-
run: |
36-
mkdir ~/.ssh
37-
chmod 700 ~/.ssh
38-
39-
echo "${{ secrets.DEPLOY_KEY_READ_VENAFI_CONNECTION_LIB }}" > ~/.ssh/venafi_connection_lib_id
40-
chmod 600 ~/.ssh/venafi_connection_lib_id
41-
42-
cat <<EOT >> ~/.ssh/config
43-
Host venafi-connection-lib.github.com
44-
HostName github.com
45-
IdentityFile ~/.ssh/venafi_connection_lib_id
46-
IdentitiesOnly yes
47-
EOT
48-
49-
cat <<EOT >> ~/.gitconfig
50-
[url "[email protected]:jetstack/venafi-connection-lib"]
51-
insteadOf = https://github.com/jetstack/venafi-connection-lib
52-
EOT
53-
54-
- uses: actions/cache@v4
35+
- uses: docker/login-action@v3
5536
with:
56-
path: _bin/downloaded
57-
key: downloaded-${{ runner.os }}-${{ hashFiles('make/_shared/tools/00_mod.mk') }}-${{ hashFiles('make/_shared/kind/00_kind_image_versions.mk') }}
37+
registry: quay.io
38+
username: ${{ secrets.QUAY_USER }}
39+
password: ${{ secrets.QUAY_PASSWORD }}
40+
- uses: docker/login-action@v3
41+
with:
42+
registry: ghcr.io
43+
username: ${{ github.actor }}
44+
password: ${{ secrets.GITHUB_TOKEN }}
5845

5946
- id: release
60-
run: make release
47+
run: make -j release
6148

6249
- uses: actions/upload-artifact@v4
6350
with:
@@ -102,7 +89,7 @@ jobs:
10289
--draft \
10390
--verify-tag \
10491
--notes-file .notes-file
105-
92+
10693
gh release upload "$VERSION" \
10794
--repo="$GITHUB_REPOSITORY" \
10895
"${{ steps.chart_download.outputs.download-path }}/${{ needs.build_images.outputs.RELEASE_HELM_CHART_NAME }}-${{ needs.build_images.outputs.RELEASE_HELM_CHART_VERSION }}.tgz"

.github/workflows/test.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)