This commit is contained in:
Lynn Orrell 2021-05-12 16:33:03 -05:00 коммит произвёл GitHub
Родитель 78db975733
Коммит 3ed2b4c82b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 52 добавлений и 34 удалений

82
.github/workflows/package-services.yaml поставляемый
Просмотреть файл

@ -30,40 +30,58 @@ jobs:
echo ::set-output name=services::[\"AccountingService accounting-service\", \"LoyaltyService loyalty-service\", \"MakeLineService make-line-service\", \"OrderService order-service\", \"ReceiptGenerationService receipt-generation-service\", \"VirtualWorker virtual-worker\", \"VirtualCustomers virtual-customers\", \"Bootstrapper bootstrapper\", \"UI ui\"] echo ::set-output name=services::[\"AccountingService accounting-service\", \"LoyaltyService loyalty-service\", \"MakeLineService make-line-service\", \"OrderService order-service\", \"ReceiptGenerationService receipt-generation-service\", \"VirtualWorker virtual-worker\", \"VirtualCustomers virtual-customers\", \"Bootstrapper bootstrapper\", \"UI ui\"]
echo ::set-output name=repositories::[\"ghcr.io/lynn-orrell/reddog\", \"ghcr.io/cloudnativegbb/paas-vnext\"] echo ::set-output name=repositories::[\"ghcr.io/lynn-orrell/reddog\", \"ghcr.io/cloudnativegbb/paas-vnext\"]
package-services: # package-services:
name: Package Services # name: Package Services
# runs-on: ubuntu-latest
# needs: set-env
# strategy:
# matrix:
# service: ${{ fromJSON(needs.set-env.outputs.services) }}
# repository: ${{ fromJSON(needs.set-env.outputs.repositories) }}
# steps:
# - uses: jungwinter/split@v1
# id: service-split
# with:
# msg: ${{ matrix.service }}
# - name: Checkout
# uses: actions/checkout@v2
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
# - name: Login to GitHub Container Registry
# uses: docker/login-action@v1
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.CR_PAT }}
# - name: Build and push
# uses: docker/build-push-action@v2
# with:
# context: .
# file: RedDog.${{ steps.service-split.outputs._0 }}/Dockerfile
# push: true
# tags: |
# ${{ matrix.repository }}/reddog-${{ steps.service-split.outputs._1 }}:latest
# ${{ matrix.repository }}/reddog-${{ steps.service-split.outputs._1 }}:${{ needs.set-env.outputs.version }}
# labels: |
# org.opencontainers.image.source=${{ github.event.repository.html_url }}
# org.opencontainers.image.created=${{ steps.prep.outputs.created }}
# org.opencontainers.image.revision=${{ github.sha }}
copy-manifests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: set-env
strategy:
matrix:
service: ${{ fromJSON(needs.set-env.outputs.services) }}
repository: ${{ fromJSON(needs.set-env.outputs.repositories) }}
steps: steps:
- uses: jungwinter/split@v1
id: service-split
with:
msg: ${{ matrix.service }}
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CR_PAT }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: RedDog.${{ steps.service-split.outputs._0 }}/Dockerfile
push: true
tags: |
${{ matrix.repository }}/reddog-${{ steps.service-split.outputs._1 }}:latest
${{ matrix.repository }}/reddog-${{ steps.service-split.outputs._1 }}:${{ needs.set-env.outputs.version }}
labels: |
org.opencontainers.image.source=${{ github.event.repository.html_url }}
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
org.opencontainers.image.revision=${{ github.sha }}
- name: Pushes manifests to the target repo
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.CR_PAT }}
with:
source_file: 'components/'
destination_repo: 'cloudnativegbb/paas-vnext'
destination_branch: 'ghactions-manifests'
# destination_folder: 'test-dir'
user_email: 'noreply-cloudnativegbb@microsoft.com'
user_name: 'cloudnativegbb'
# commit_message: 'A custom message for the commit'