Skip to content

Commit ab4a205

Browse files
committed
merge build and publish jobs
1 parent c72e1e2 commit ab4a205

File tree

1 file changed

+7
-31
lines changed

1 file changed

+7
-31
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env:
1212

1313
jobs:
1414
build:
15-
name: build & sign docker image
15+
name: build, sign & deploy
1616
runs-on: ubuntu-latest
1717
permissions:
1818
contents: read
@@ -30,8 +30,12 @@ jobs:
3030
with:
3131
cosign-release: 'v2.2.4'
3232

33-
- name: Set up Skaffold
34-
uses: hiberbee/[email protected]
33+
- name: Install Skaffold
34+
run: |
35+
set -euo pipefail
36+
curl -L "https://storage.googleapis.com/skaffold/releases/v2.16.1/skaffold-linux-amd64" -o skaffold
37+
chmod +x skaffold
38+
sudo mv skaffold /usr/local/bin/skaffold
3539
3640
# Set up BuildKit Docker container builder to be able to build
3741
# multi-platform images and export cache
@@ -68,28 +72,6 @@ jobs:
6872
cosign sign --yes "$REF"
6973
done
7074
71-
- name: Upload build artifacts for deploy
72-
uses: actions/upload-artifact@v4
73-
with:
74-
name: skaffold-build-output
75-
path: build.out.json
76-
if-no-files-found: error
77-
78-
79-
run-skaffold:
80-
name: deploy
81-
runs-on: ubuntu-latest
82-
needs: build
83-
permissions:
84-
contents: read
85-
id-token: write
86-
steps:
87-
- name: Checkout repository
88-
uses: actions/checkout@v4
89-
90-
- name: Set up Skaffold
91-
uses: hiberbee/[email protected]
92-
9375
# Provide your cluster config (example expects a base64-encoded kubeconfig secret)
9476
- name: Configure kubeconfig
9577
env:
@@ -98,12 +80,6 @@ jobs:
9880
mkdir -p ~/.kube
9981
echo "${KUBECONFIG_B64}" | base64 -d > ~/.kube/config
10082
101-
- name: Download build artifacts
102-
uses: actions/download-artifact@v4
103-
with:
104-
name: skaffold-build-output
105-
path: .
106-
10783
# Deploy using the exact images produced in the build job
10884
- name: Deploy with Skaffold
10985
run: |

0 commit comments

Comments
 (0)