From 84ea133e57ce3577e18a2d39ef251a34b09a5f18 Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Thu, 26 Sep 2024 09:19:24 -0400 Subject: [PATCH] workflow --- .github/workflows/deployment.yml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/deployment.yml diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml new file mode 100644 index 0000000..8a7fa89 --- /dev/null +++ b/.github/workflows/deployment.yml @@ -0,0 +1,38 @@ +name: Deployment +on: + push: + branches: + - master +jobs: + install: + name: Install + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "latest" + cache: "npm" + - name: Load node_modules cache + uses: actions/cache@v4 + with: + path: | + **/node_modules + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: NPM + run: npm ci + - 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: Build and push + uses: docker/build-push-action@v6 + with: + push: true + tags: baobeld/rusty-api:latest