This repository has been archived by the owner on Sep 25, 2024. It is now read-only.
forked from locustio/locust
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (53 loc) · 1.57 KB
/
buildimage.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
47
48
49
50
51
52
53
54
name: Locust build image
on:
workflow_dispatch:
push:
branches:
- "master"
defaults:
run:
shell: bash
permissions:
contents: read
id-token: write
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
env:
REGISTRY: us-east1-docker.pkg.dev/acuitymd-core-services/python
TAG: ${{ github.sha }}
ENV: dev
jobs:
build-locust:
name: FlightServer Build (DEV)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v2
with:
token_format: "access_token"
workload_identity_provider: ${{ vars.DEV_GCP_GHA_WORKLOAD_IDP}}
service_account: ${{ vars.DEV_GCP_GHA_SERVICE_ACCOUNT}}
- name: Login to Google Artifact Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and Pushs
uses: docker/build-push-action@v5
env:
APP: locust
with:
file: ./Dockerfile.ci
push: true
provenance: false
tags: ${{ env.REGISTRY }}/${{ env.APP }}:${{ env.TAG }}, ${{ env.REGISTRY }}/${{ env.APP }}:latest
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max