Skip to content

Commit

Permalink
Merge pull request #1720 from skynet2/extra-publish
Browse files Browse the repository at this point in the history
feat: extra publish
  • Loading branch information
fqutishat committed May 12, 2024
2 parents 77d04a8 + 1748ea4 commit 17fa8ac
Showing 1 changed file with 219 additions and 0 deletions.
219 changes: 219 additions & 0 deletions .github/workflows/publish-mocks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
#
# Copyright SecureKey Technologies Inc. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#

name: mocks
on:
push:
branches:
- main
jobs:
mock-webhook:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set ENV vars
run: |
TAG=$(git describe --tags --always `git rev-list --tags --max-count=1`)
echo "IMAGE_TAG"=$TAG >> $GITHUB_ENV
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.CR_USER }}
password: ${{ secrets.CR_PAT }}

- name: Setup Go 1.21
uses: actions/setup-go@v5
with:
go-version: '1.21'

- run: make sample-webhook

- name: Build and Push
uses: docker/build-push-action@v5
with:
context: .
file: ./images/mocks/webhook/Dockerfile
platforms: linux/amd64
build-args: |
GO_IMAGE=golang
ALPINE_VER=3.18
GO_VER=1.21
ALPINE_IMAGE=alpine
push: false
tags: |
ghcr.io/trustbloc/mock-webhook:latest
ghcr.io/trustbloc/mock-webhook:${{ env.IMAGE_TAG }}-latest
mock-login-consent:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set ENV vars
run: |
TAG=$(git describe --tags --always `git rev-list --tags --max-count=1`)
echo "IMAGE_TAG"=$TAG >> $GITHUB_ENV
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.CR_USER }}
password: ${{ secrets.CR_PAT }}

- name: Build and Push
uses: docker/build-push-action@v5
with:
context: test/bdd/loginconsent
file: ./images/mocks/loginconsent/Dockerfile
platforms: linux/amd64
build-args: |
GO_IMAGE=golang
ALPINE_VER=3.18
GO_VER=1.21
ALPINE_IMAGE=alpine
push: false
tags: |
ghcr.io/trustbloc/mock-login-consent:latest
ghcr.io/trustbloc/mock-login-consent:${{ env.IMAGE_TAG }}-latest
mock-trustregistry:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set ENV vars
run: |
TAG=$(git describe --tags --always `git rev-list --tags --max-count=1`)
echo "IMAGE_TAG"=$TAG >> $GITHUB_ENV
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.CR_USER }}
password: ${{ secrets.CR_PAT }}

- name: Build and Push
uses: docker/build-push-action@v5
with:
context: test/bdd/trustregistry
file: ./images/mocks/trustregistry/Dockerfile
platforms: linux/amd64
build-args: |
GO_IMAGE=golang
ALPINE_VER=3.18
GO_VER=1.21
ALPINE_IMAGE=alpine
push: false
tags: |
ghcr.io/trustbloc/mock-trustregistry:latest
ghcr.io/trustbloc/mock-trustregistry:${{ env.IMAGE_TAG }}-latest
mock-attestation:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set ENV vars
run: |
TAG=$(git describe --tags --always `git rev-list --tags --max-count=1`)
echo "IMAGE_TAG"=$TAG >> $GITHUB_ENV
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.CR_USER }}
password: ${{ secrets.CR_PAT }}

- name: Build and Push
uses: docker/build-push-action@v5
with:
context: test/bdd/attestation
file: ./images/mocks/attestation/Dockerfile
platforms: linux/amd64
build-args: |
GO_IMAGE=golang
ALPINE_VER=3.18
GO_VER=1.21
ALPINE_IMAGE=alpine
push: false
tags: |
ghcr.io/trustbloc/mock-attestation:latest
ghcr.io/trustbloc/mock-attestation:${{ env.IMAGE_TAG }}-latest
mock-cognito-auth:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set ENV vars
run: |
TAG=$(git describe --tags --always `git rev-list --tags --max-count=1`)
echo "IMAGE_TAG"=$TAG >> $GITHUB_ENV
- name: Setup Go 1.21
uses: actions/setup-go@v5
with:
go-version: '1.21'

- run: make sample-cognito-auth

- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.CR_USER }}
password: ${{ secrets.CR_PAT }}

- name: Build and Push
uses: docker/build-push-action@v5
with:
context: .
file: ./images/mocks/cognito-auth/Dockerfile
platforms: linux/amd64
build-args: |
GO_IMAGE=golang
ALPINE_VER=3.18
GO_VER=1.21
ALPINE_IMAGE=alpine
push: false
tags: |
ghcr.io/trustbloc/mock-cognito-auth:latest
ghcr.io/trustbloc/mock-cognito-auth:${{ env.IMAGE_TAG }}-latest

0 comments on commit 17fa8ac

Please sign in to comment.