diff --git a/.github/workflows/build-deploy-prod.yml b/.github/workflows/build-deploy-prod.yml deleted file mode 100644 index da27e7ca..00000000 --- a/.github/workflows/build-deploy-prod.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: "Build and Deploy to Prod" - -on: - workflow_dispatch: - -concurrency: ${{ github.workflow }}-${{ github.ref }} - -jobs: - publish: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [20.x] - steps: - - run: echo "TODO" - # - uses: actions/checkout@v3 - # with: - # submodules: recursive - # - uses: actions/setup-node@v3 - # with: - # node-version: ${{ matrix.node-version }} - - # - name: Determine latest version - # run: echo "APP_VERSION=$(git describe --tags || git rev-parse --short HEAD)" >> $GITHUB_ENV - - # - name: Login to GitHub Container Registry - # uses: docker/login-action@v2 - # with: - # registry: ghcr.io - # username: ${{ github.actor }} - # password: ${{ secrets.GITHUB_TOKEN }} - - # - name: Build docker image and push - # uses: docker/build-push-action@v4 - # with: - # context: ./ - # file: ./Dockerfile - # build-args: APP_VERSION=${{ env.APP_VERSION }} - # push: true - # tags: ghcr.io/sv443-network/jokeapi:latest - - # - name: Delete old packages - # uses: actions/delete-package-versions@v4 - # with: - # package-name: ${{ github.event.repository.name }} - # package-type: "container" - # min-versions-to-keep: 3 - # delete-only-untagged-versions: "true" - - # - name: Deploy to prod - # run: echo "TODO Trigger prod deployment here" diff --git a/.github/workflows/build-deploy-prod.yml.disabled b/.github/workflows/build-deploy-prod.yml.disabled new file mode 100644 index 00000000..f29b5455 --- /dev/null +++ b/.github/workflows/build-deploy-prod.yml.disabled @@ -0,0 +1,51 @@ +name: "Build and Deploy to Prod" + +on: + workflow_dispatch: + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + publish: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20.x] + steps: + - run: echo "TODO" + - uses: actions/checkout@v3 + with: + submodules: recursive + - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Determine latest version + run: echo "APP_VERSION=$(git describe --tags || git rev-parse --short HEAD)" >> $GITHUB_ENV + + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build docker image and push + uses: docker/build-push-action@v4 + with: + context: ./ + file: ./Dockerfile + build-args: APP_VERSION=${{ env.APP_VERSION }} + push: true + tags: ghcr.io/sv443-network/jokeapi:latest + + - name: Delete old packages + uses: actions/delete-package-versions@v4 + with: + package-name: ${{ github.event.repository.name }} + package-type: "container" + min-versions-to-keep: 3 + delete-only-untagged-versions: "true" + + - name: Deploy to prod + run: echo "TODO Trigger prod deployment here" diff --git a/.github/workflows/build-deploy-stage.yml b/.github/workflows/build-deploy-stage.yml deleted file mode 100644 index b364d5e9..00000000 --- a/.github/workflows/build-deploy-stage.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: "Build and Deploy to Stage" - -on: - workflow_dispatch: - push: - branches: - - v3 - -concurrency: ${{ github.workflow }}-${{ github.ref }} - -jobs: - publish: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [20.x] - steps: - - run: echo "TODO" - # - uses: actions/checkout@v3 - # with: - # submodules: recursive - # - uses: actions/setup-node@v3 - # with: - # node-version: ${{ matrix.node-version }} - - # - name: Determine latest version - # run: echo "APP_VERSION=$(git describe --tags || git rev-parse --short HEAD)" >> $GITHUB_ENV - - # - name: Login to GitHub Container Registry - # uses: docker/login-action@v2 - # with: - # registry: ghcr.io - # username: ${{ github.actor }} - # password: ${{ secrets.GITHUB_TOKEN }} - - # - name: Build docker image and push - # uses: docker/build-push-action@v4 - # with: - # context: ./ - # file: ./Dockerfile - # build-args: APP_VERSION=${{ env.APP_VERSION }} - # push: true - # tags: ghcr.io/sv443-network/jokeapi-stage:latest - - # - name: Delete old packages - # uses: actions/delete-package-versions@v4 - # with: - # package-name: ${{ github.event.repository.name }} - # package-type: "container" - # min-versions-to-keep: 3 - # delete-only-untagged-versions: "true" - - # - name: Deploy to stage - # run: echo "TODO Trigger stage deployment here" diff --git a/.github/workflows/build-deploy-stage.yml.disabled b/.github/workflows/build-deploy-stage.yml.disabled new file mode 100644 index 00000000..b10d64a1 --- /dev/null +++ b/.github/workflows/build-deploy-stage.yml.disabled @@ -0,0 +1,54 @@ +name: "Build and Deploy to Stage" + +on: + workflow_dispatch: + push: + branches: + - v3 + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + publish: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20.x] + steps: + - run: echo "TODO" + - uses: actions/checkout@v3 + with: + submodules: recursive + - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Determine latest version + run: echo "APP_VERSION=$(git describe --tags || git rev-parse --short HEAD)" >> $GITHUB_ENV + + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build docker image and push + uses: docker/build-push-action@v4 + with: + context: ./ + file: ./Dockerfile + build-args: APP_VERSION=${{ env.APP_VERSION }} + push: true + tags: ghcr.io/sv443-network/jokeapi-stage:latest + + - name: Delete old packages + uses: actions/delete-package-versions@v4 + with: + package-name: ${{ github.event.repository.name }} + package-type: "container" + min-versions-to-keep: 3 + delete-only-untagged-versions: "true" + + - name: Deploy to stage + run: echo "TODO Trigger stage deployment here"