Set up push
This commit is contained in:
parent
f09f6f5b72
commit
5c4d770797
38
.github/workflows/ordering-api.yml
vendored
38
.github/workflows/ordering-api.yml
vendored
@ -95,32 +95,12 @@ jobs:
|
|||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Set branch name as env variable
|
- name: Pushing Image to Github Container Registry
|
||||||
run: |
|
uses: docker/build-push-action@v2
|
||||||
currentbranch=$(echo ${GITHUB_REF##*/})
|
with:
|
||||||
echo "running on $currentbranch"
|
context: ./src/Services/Ordering/Ordering.API
|
||||||
echo "BRANCH=$currentbranch" >> $GITHUB_ENV
|
version: latest
|
||||||
shell: bash
|
file: Dockerfile
|
||||||
|
push: true
|
||||||
- name: Compose build ${{ env.SERVICE }}
|
tags: ghcr.io/${{ github.repository }}:latest
|
||||||
run: sudo -E docker-compose build ${{ env.SERVICE }}
|
|
||||||
working-directory: ./src
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
TAG: ${{ env.BRANCH }}
|
|
||||||
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
|
|
||||||
|
|
||||||
- name: Compose push ${{ env.SERVICE }}
|
|
||||||
run: sudo -E docker-compose push ${{ env.SERVICE }}
|
|
||||||
working-directory: ./src
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
TAG: ${{ env.BRANCH }}
|
|
||||||
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
|
|
||||||
|
|
||||||
- name: Create multiarch manifest
|
|
||||||
run: |
|
|
||||||
docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }}
|
|
||||||
docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }}
|
|
||||||
shell: bash
|
|
36
.github/workflows/ordering-backgroundtasks.yml
vendored
36
.github/workflows/ordering-backgroundtasks.yml
vendored
@ -62,31 +62,11 @@ jobs:
|
|||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Set branch name as env variable
|
- name: Pushing Image to Github Container Registry
|
||||||
run: |
|
uses: docker/build-push-action@v2
|
||||||
currentbranch=$(echo ${GITHUB_REF##*/})
|
with:
|
||||||
echo "running on $currentbranch"
|
context: ./src/Services/Ordering/Ordering.BackgroundTasks
|
||||||
echo "BRANCH=$currentbranch" >> $GITHUB_ENV
|
version: latest
|
||||||
shell: bash
|
file: Dockerfile
|
||||||
|
push: true
|
||||||
- name: Compose build ${{ env.SERVICE }}
|
tags: ghcr.io/${{ github.repository }}:latest
|
||||||
run: sudo -E docker-compose build ${{ env.SERVICE }}
|
|
||||||
working-directory: ./src
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
TAG: ${{ env.BRANCH }}
|
|
||||||
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
|
|
||||||
|
|
||||||
- name: Compose push ${{ env.SERVICE }}
|
|
||||||
run: sudo -E docker-compose push ${{ env.SERVICE }}
|
|
||||||
working-directory: ./src
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
TAG: ${{ env.BRANCH }}
|
|
||||||
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
|
|
||||||
|
|
||||||
- name: Create multiarch manifest
|
|
||||||
run: |
|
|
||||||
docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }}
|
|
||||||
docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }}
|
|
||||||
shell: bash
|
|
36
.github/workflows/ordering-signalrhub.yml
vendored
36
.github/workflows/ordering-signalrhub.yml
vendored
@ -62,31 +62,11 @@ jobs:
|
|||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Set branch name as env variable
|
- name: Pushing Image to Github Container Registry
|
||||||
run: |
|
uses: docker/build-push-action@v2
|
||||||
currentbranch=$(echo ${GITHUB_REF##*/})
|
with:
|
||||||
echo "running on $currentbranch"
|
context: ./src/Services/Ordering/Ordering.SignalrHub
|
||||||
echo "BRANCH=$currentbranch" >> $GITHUB_ENV
|
version: latest
|
||||||
shell: bash
|
file: Dockerfile
|
||||||
|
push: true
|
||||||
- name: Compose build ${{ env.SERVICE }}
|
tags: ghcr.io/${{ github.repository }}:latest
|
||||||
run: sudo -E docker-compose build ${{ env.SERVICE }}
|
|
||||||
working-directory: ./src
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
TAG: ${{ env.BRANCH }}
|
|
||||||
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
|
|
||||||
|
|
||||||
- name: Compose push ${{ env.SERVICE }}
|
|
||||||
run: sudo -E docker-compose push ${{ env.SERVICE }}
|
|
||||||
working-directory: ./src
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
TAG: ${{ env.BRANCH }}
|
|
||||||
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
|
|
||||||
|
|
||||||
- name: Create multiarch manifest
|
|
||||||
run: |
|
|
||||||
docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }}
|
|
||||||
docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }}
|
|
||||||
shell: bash
|
|
Loading…
x
Reference in New Issue
Block a user