From db920f98547a58312cd8abfaa85d9b78d820a993 Mon Sep 17 00:00:00 2001 From: Vitor Hideyoshi Nakazone Batista Date: Sun, 25 Feb 2024 05:16:53 -0300 Subject: [PATCH 1/2] Implements CI/CD - DockerHub --- .github/workflows/docker-image.yml | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..010b910 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,42 @@ +name: ci + +on: + push: + branches: + - 'main' + +jobs: + docker: + + runs-on: ubuntu-latest + steps: + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v2 + with: + push: true + tags: yoshiunfriendly/message-hideyoshi.com:latest + + run-dispatcher: + needs: docker + runs-on: ubuntu-latest + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Runs Infra-Hideyoshi.com Deployment Dispatcher + run: | + curl -X POST https://api.github.com/repos/HideyoshiSolutions/infra-hideyoshi.com/dispatches \ + -H 'Accept: application/vnd.github.everest-preview+json' \ + -u ${{ secrets.ACTIONS_KEY }} \ + --data '{"event_type": "refresh-deployments", "client_payload": { "deployments": "message-deployment" }}' \ No newline at end of file From 4f39c3690c1d16822d7d5ec5417238aaad2f0c83 Mon Sep 17 00:00:00 2001 From: Vitor Hideyoshi Nakazone Batista Date: Sun, 25 Feb 2024 05:18:59 -0300 Subject: [PATCH 2/2] Temporally Removes Dispatcher Until Deployment Ready --- .github/workflows/docker-image.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 010b910..4b70adc 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -29,14 +29,14 @@ jobs: push: true tags: yoshiunfriendly/message-hideyoshi.com:latest - run-dispatcher: - needs: docker - runs-on: ubuntu-latest - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Runs Infra-Hideyoshi.com Deployment Dispatcher - run: | - curl -X POST https://api.github.com/repos/HideyoshiSolutions/infra-hideyoshi.com/dispatches \ - -H 'Accept: application/vnd.github.everest-preview+json' \ - -u ${{ secrets.ACTIONS_KEY }} \ - --data '{"event_type": "refresh-deployments", "client_payload": { "deployments": "message-deployment" }}' \ No newline at end of file +# run-dispatcher: +# needs: docker +# runs-on: ubuntu-latest +# steps: +# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it +# - name: Runs Infra-Hideyoshi.com Deployment Dispatcher +# run: | +# curl -X POST https://api.github.com/repos/HideyoshiSolutions/infra-hideyoshi.com/dispatches \ +# -H 'Accept: application/vnd.github.everest-preview+json' \ +# -u ${{ secrets.ACTIONS_KEY }} \ +# --data '{"event_type": "refresh-deployments", "client_payload": { "deployments": "message-deployment" }}' \ No newline at end of file