-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.13 KB
/
build-docker.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
name: Build Docker
on:
push:
branches:
- main
concurrency:
group: k6
cancel-in-progress: true
jobs:
build:
name: docker
runs-on: self-hosted-hoprnet-small
steps:
- name: Checkout hoprnet repository
uses: actions/checkout@v3
- name: Set up Google Cloud Credentials
id: auth
uses: google-github-actions/auth@v1
with:
token_format: "access_token"
credentials_json: ${{ secrets.GOOGLE_HOPRASSOCIATION_CREDENTIALS_REGISTRY }}
- name: Login Google Container Registry
uses: docker/login-action@v2
with:
registry: europe-west3-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver: kubernetes
- name: Build and push docker image
uses: docker/build-push-action@v4
with:
push: true
context: k6
tags: europe-west3-docker.pkg.dev/${{ secrets.GOOGLE_HOPRASSOCIATION_PROJECT }}/docker-images/hoprd-k6:latest