SampleImages #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SampleImages | |
on: | |
workflow_dispatch: | |
permissions: write-all | |
env: | |
ContainerRegistry: "ghcr.io" | |
ContainerRegistryRepo: "ghcr.io/eclipse-symphony" | |
jobs: | |
build: | |
if: github.repository == 'eclipse-symphony/symphony' && (github.actor == 'chgennar' || github.actor == 'juancooldude' || github.actor == 'Haishi2016' || github.actor == 'nonsocode' || github.actor == 'msftcoderdjw' || github.actor == 'TonyXiaofeng' || github.actor == 'RemindD') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.ContainerRegistry }} | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19 # Replace with your desired Go version | |
- name: Read Version | |
id: read_version | |
run: | | |
version=$(cat .github/version/versions.txt) | |
echo "version=$version" >> $GITHUB_OUTPUT | |
- name: Build flask app | |
run: | | |
cd docs/samples/sample-payload-flask | |
docker build -t ${{ env.ContainerRegistryRepo }}/sample-flask-app:${{ steps.read_version.outputs.version }} . | |
- name: Build python sdk | |
run: | | |
cd sdks/python-sdk | |
docker build -t ${{ env.ContainerRegistryRepo }}/symphony-python-sdk:${{ steps.read_version.outputs.version }} . | |
- name: Build akri | |
run: | | |
cd docs/samples/akri-discover-job | |
go build -o discover-job | |
docker build -t ${{ env.ContainerRegistryRepo }}/symphony-akri:${{ steps.read_version.outputs.version }} -f ./Dockerfile.microsoft . | |
- name: Push sample-flask-app images | |
run: | | |
docker push ${{ env.ContainerRegistryRepo }}/sample-flask-app:${{ steps.read_version.outputs.version }} | |
docker tag ${{ env.ContainerRegistryRepo }}/sample-flask-app:${{ steps.read_version.outputs.version }} ${{ env.ContainerRegistryRepo }}/sample-flask-app:latest | |
docker push ${{ env.ContainerRegistryRepo }}/sample-flask-app:latest | |
- name: Push symphony-python-sdk images | |
run: | | |
docker push ${{ env.ContainerRegistryRepo }}/symphony-python-sdk:${{ steps.read_version.outputs.version }} | |
docker tag ${{ env.ContainerRegistryRepo }}/symphony-python-sdk:${{ steps.read_version.outputs.version }} ${{ env.ContainerRegistryRepo }}/symphony-python-sdk:latest | |
docker push ${{ env.ContainerRegistryRepo }}/symphony-python-sdk:latest | |
- name: Push symphony-akri images | |
run: | | |
docker push ${{ env.ContainerRegistryRepo }}/symphony-akri:${{ steps.read_version.outputs.version }} | |
docker tag ${{ env.ContainerRegistryRepo }}/symphony-akri:${{ steps.read_version.outputs.version }} ${{ env.ContainerRegistryRepo }}/symphony-akri:latest | |
docker push ${{ env.ContainerRegistryRepo }}/symphony-akri:latest |