From 3e7182775ed7d4104ddb7f338d35f7694fe0c60a Mon Sep 17 00:00:00 2001 From: xivk Date: Thu, 30 May 2024 11:31:00 +0200 Subject: [PATCH] Added build process. --- .github/workflows/production.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/production.yml diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml new file mode 100644 index 0000000..baf5eba --- /dev/null +++ b/.github/workflows/production.yml @@ -0,0 +1,26 @@ +name: production + +on: + push: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Login to Docker Hub + run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u anywaysbot --password-stdin + + - name: Build the Docker image + run: docker build . --file Dockerfile --tag anywaysopen/cityflows-api:prod --tag anywaysopen/cityflows-api:prod-0.$GITHUB_RUN_NUMBER + + - name: Publish the image. + run: docker push anywaysopen/cityflows-api:prod + - name: Publish the image. + run: docker push anywaysopen/cityflows-api:prod-0.$GITHUB_RUN_NUMBER + + \ No newline at end of file