diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 139124f1..ccebdf06 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,69 +35,76 @@ jobs: run: bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //... push_ark_nova_stats: needs: build + if: ${{ github.ref == 'refs/heads/main' }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Login to Docker Hub - if: ${{ github.ref == 'refs/heads/main' }} uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Push to Docker Hub - if: ${{ github.ref == 'refs/heads/main' }} run: | bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc run --build_tag_filters=manual --stamp --embed_label $(git rev-parse HEAD) //ark_nova_stats/api:api_image_image_dockerhub + deploy_ark_nova_stats: + needs: push_ark_nova_stats + if: ${{ github.ref == 'refs/heads/main' }} + env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: superfly/flyctl-actions/setup-flyctl@master + - run: flyctl deploy + working-directory: ark_nova_stats/api push_fitbit_challenges: needs: build + if: ${{ github.ref == 'refs/heads/main' }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Login to Docker Hub - if: ${{ github.ref == 'refs/heads/main' }} uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Push to Docker Hub - if: ${{ github.ref == 'refs/heads/main' }} run: | bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc run --build_tag_filters=manual --stamp --embed_label $(git rev-parse HEAD) //fitbit_challenges/api:api_image_image_dockerhub bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc run --build_tag_filters=manual --stamp --embed_label $(git rev-parse HEAD) //fitbit_challenges/worker:image_dockerhub bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc run --build_tag_filters=manual --stamp --embed_label $(git rev-parse HEAD) //fitbit_challenges/frontend:production_cross_platform_image_dockerhub push_home_api: needs: build + if: ${{ github.ref == 'refs/heads/main' }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Login to Docker Hub - if: ${{ github.ref == 'refs/heads/main' }} uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Push to Docker Hub - if: ${{ github.ref == 'refs/heads/main' }} run: | bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc run --build_tag_filters=manual --stamp --embed_label $(git rev-parse HEAD) //home_api/api:api_image_image_dockerhub bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc run --build_tag_filters=manual --stamp --embed_label $(git rev-parse HEAD) //home_api/frontend:production_cross_platform_image_dockerhub push_mc_manager: needs: build + if: ${{ github.ref == 'refs/heads/main' }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Login to Docker Hub - if: ${{ github.ref == 'refs/heads/main' }} uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Push to Docker Hub - if: ${{ github.ref == 'refs/heads/main' }} run: | bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc run --build_tag_filters=manual --stamp --embed_label $(git rev-parse HEAD) //mc_manager/api:api_image_image_dockerhub bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc run --build_tag_filters=manual --stamp --embed_label $(git rev-parse HEAD) //mc_manager/worker:image_dockerhub