Skip to content

Commit

Permalink
build plus image
Browse files Browse the repository at this point in the history
  • Loading branch information
pdabelf5 committed Jan 6, 2025
1 parent 2ea66d1 commit 0667abb
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/agent-v3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build agent-v3 image

on:
push:
branches:
agent-v3

defaults:
run:
shell: bash

permissions:
contents: read

jobs:
build:
permissions:
contents: read # for docker/build-push-action to read repo content
id-token: write # for login to GCP
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2.1.7
with:
token_format: access_token
workload_identity_provider: ${{ secrets.GCR_WORKLOAD_IDENTITY }}
service_account: ${{ secrets.GCR_SERVICE_ACCOUNT }}

- name: Login to GCR
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: gcr.io
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}

- name: Setup plus credentials
run: |
printf '%s\n' "${CERT}" > nginx-repo.crt
printf '%s\n' "${KEY}" > nginx-repo.key
env:
CERT: ${{ secrets.NGINX_CRT }}
KEY: ${{ secrets.NGINX_KEY }}

- name: Build Image
run: |
docker build -f build/Dockerfile-plus -t ${REGISTRY}/${PREFIX}:${TAG} .
env:
REGISTRY: gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev
PREFIX: pdabel
TAG: plus
- name: Push image
run:
docker push ${REGISTRY}/${PREFIX}:${TAG}
env:
REGISTRY: gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev
PREFIX: pdabel
TAG: plus
5 changes: 5 additions & 0 deletions build/Dockerfile-plus
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# syntax=docker/dockerfile:1.6
FROM alpine:3.21

COPY nginx-repo.crt /
COPY nginx-repo.key /

0 comments on commit 0667abb

Please sign in to comment.