From 88188d2c2d29d3f9c119f10712c6efa04999b34e Mon Sep 17 00:00:00 2001 From: jordancaraballo Date: Tue, 16 Jan 2024 12:58:14 -0500 Subject: [PATCH] Splitting dev and prod --- .github/workflows/ilab-base-dev.yaml | 44 +++++++++++++++ .github/workflows/ilab-base-prod.yaml | 44 +++++++++++++++ .github/workflows/ilab-base.yaml | 81 --------------------------- 3 files changed, 88 insertions(+), 81 deletions(-) create mode 100644 .github/workflows/ilab-base-dev.yaml create mode 100644 .github/workflows/ilab-base-prod.yaml delete mode 100644 .github/workflows/ilab-base.yaml diff --git a/.github/workflows/ilab-base-dev.yaml b/.github/workflows/ilab-base-dev.yaml new file mode 100644 index 0000000..7551dc4 --- /dev/null +++ b/.github/workflows/ilab-base-dev.yaml @@ -0,0 +1,44 @@ +name: ilab-base-docker + +on: + push: + branches: + - 'develop' + +jobs: + + ilab-base-dev: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - + name: Lower github-runner storage + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + + - + name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + file: ./requirements/Dockerfile + push: true + tags: nasanccs/ilab-base:dev \ No newline at end of file diff --git a/.github/workflows/ilab-base-prod.yaml b/.github/workflows/ilab-base-prod.yaml new file mode 100644 index 0000000..d322564 --- /dev/null +++ b/.github/workflows/ilab-base-prod.yaml @@ -0,0 +1,44 @@ +name: ilab-base-docker + +on: + push: + branches: + - 'main' + +jobs: + + ilab-base-production: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - + name: Lower github-runner storage + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + + - + name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + file: ./docker/ilab-base/Dockerfile.ilab-base-gdal-3.3.3 + push: true + tags: nasanccs/ilab-base:latest \ No newline at end of file diff --git a/.github/workflows/ilab-base.yaml b/.github/workflows/ilab-base.yaml deleted file mode 100644 index 5cab6af..0000000 --- a/.github/workflows/ilab-base.yaml +++ /dev/null @@ -1,81 +0,0 @@ -name: ilab-base-docker - -on: - push: - branches: - - 'main' - -jobs: - - ilab-base-production: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - - name: Lower github-runner storage - run: | - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - - - - name: Build and push - uses: docker/build-push-action@v4 - with: - context: . - file: ./docker/ilab-base/Dockerfile.ilab-base-gdal-3.3.3 - push: true - tags: nasanccs/ilab-base:latest - - ilab-base-dev: - runs-on: ubuntu-latest - on: [push, pull_request] - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - - name: Lower github-runner storage - run: | - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - - - - name: Build and push - uses: docker/build-push-action@v4 - with: - context: . - file: ./requirements/Dockerfile - push: true - tags: nasanccs/ilab-base:dev \ No newline at end of file