From 3126de2fad67b9e5bd64fdaefb8ee44b0401b1b3 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Thu, 21 Dec 2023 13:02:23 -0800 Subject: [PATCH] Update automation to support shared GHA updates --- .github/workflows/publish_release.yml | 13 +++- .github/workflows/publish_test_build.yml | 13 +++- .../workflows/publish_test_websat_build.yml | 62 ------------------- 3 files changed, 22 insertions(+), 66 deletions(-) delete mode 100644 .github/workflows/publish_test_websat_build.yml diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index ff73f4a..2740690 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -10,7 +10,16 @@ jobs: build_and_publish_pypi_and_release: uses: neongeckocom/.github/.github/workflows/publish_stable_release.yml@master secrets: inherit - build_and_publish_docker: + build_and_publish_docker_gradio: needs: build_and_publish_pypi_and_release uses: neongeckocom/.github/.github/workflows/publish_docker.yml@master - secrets: inherit \ No newline at end of file + secrets: inherit + with: + build_args: EXTRAS=gradio + build_and_publish_docker_websat: + needs: build_and_publish_pypi_and_release + uses: neongeckocom/.github/.github/workflows/publish_docker.yml@master + secrets: inherit + with: + build_args: EXTRAS=web_sat + image_name: ${{ github.repository }}-websat \ No newline at end of file diff --git a/.github/workflows/publish_test_build.yml b/.github/workflows/publish_test_build.yml index 5d9d572..2af420a 100644 --- a/.github/workflows/publish_test_build.yml +++ b/.github/workflows/publish_test_build.yml @@ -16,7 +16,16 @@ jobs: version_file: "neon_iris/version.py" setup_py: "setup.py" publish_prerelease: true - build_and_publish_docker: + build_and_publish_docker_gradio: needs: publish_alpha_release uses: neongeckocom/.github/.github/workflows/publish_docker.yml@master - secrets: inherit \ No newline at end of file + secrets: inherit + with: + build_args: EXTRAS=gradio + build_and_publish_docker_websat: + needs: publish_alpha_release + uses: neongeckocom/.github/.github/workflows/publish_docker.yml@master + secrets: inherit + with: + build_args: EXTRAS=web_sat + image_name: ${{ github.repository }}-websat \ No newline at end of file diff --git a/.github/workflows/publish_test_websat_build.yml b/.github/workflows/publish_test_websat_build.yml deleted file mode 100644 index 22bce64..0000000 --- a/.github/workflows/publish_test_websat_build.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Publish Docker Containers -on: - push: - branches: - - dev - - main - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }}-websat - -jobs: - build_and_publish_docker: - runs-on: ubuntu-latest - outputs: - version: "${{ steps.version.version }}" - permissions: - contents: read - packages: write - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - ref: ${{ github.ref }} - - - name: Log in to the Container registry - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Get Version - id: version - run: | - VERSION=$(sed "s/a/-a./" <<< $(python setup.py --version)) - echo "version=${VERSION}" >> $GITHUB_OUTPUT - env: - image_name: ${{ env.IMAGE_NAME }} - - - name: Setup QEMU - uses: docker/setup-qemu-action@v3 - - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Extract metadata for base Docker - id: base_meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - tags: | - type=semver,pattern={{version}},value=${{ steps.version.outputs.version }} - type=ref,event=branch - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - file: ./Dockerfile.websat - push: true - tags: ${{ steps.base_meta.outputs.tags }} - labels: ${{ steps.base_meta.outputs.labels }} - platforms: linux/amd64,linux/arm64,linux/arm/v7