From 417bf69004a529db70995545e1ed38d6375585ff Mon Sep 17 00:00:00 2001 From: Itamar Shefi Date: Wed, 10 Jan 2024 16:47:44 +0200 Subject: [PATCH] Add docker ci/cd --- .github/workflows/ci_cd.yml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/ci_cd.yml diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml new file mode 100644 index 0000000..27e4043 --- /dev/null +++ b/.github/workflows/ci_cd.yml @@ -0,0 +1,38 @@ +name: ci/cd + +on: + push: + branches: + - 'main' + pull_request: + branches: + - 'main' + + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Save configuration file + run: | + echo `${{ secrets.YAML_CONFIG_STR }}` > config.yaml + - + name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ishefi/semantle:latest