Skip to content

Commit

Permalink
Enable customer branches
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik committed Oct 30, 2023
1 parent 38402a1 commit 62069c8
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/customer-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Customer Docker images

on:
push:
branches:
- 'customer-*'
pull_request:
branches:
- 'customer-*'

jobs:
docker-build:
strategy:
matrix:
runner: [ubicloud]
runs-on: ${{ matrix.runner }}
permissions:
contents: read
packages: write
steps:
- name: checkout
uses: actions/checkout@v3
with:
submodules: recursive

- uses: depot/setup-action@v1

- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}

- name: Set Short Commit Hash
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"

- name: extract branch name suffix for customer
id: branch
run: echo "::set-output name=branch::$(echo ${{ github.ref }} | sed 's/customer-//g')"

- name: Build (optionally publish) PeerDB Images
uses: depot/bake-action@v1
with:
token: ${{ secrets.DEPOT_TOKEN }}
files: ./docker-bake.hcl
push: ${{ startsWith(github.ref, 'refs/heads/customer-') }}
env:
SHA_SHORT: dev-${{ steps.vars.outputs.sha_short }}
TAG: latest-${{ steps.branch.outputs.branch }}

0 comments on commit 62069c8

Please sign in to comment.