From 3b2bdd320721a0f3f3fb3554d24cac6f18148be7 Mon Sep 17 00:00:00 2001 From: Raissa Brizeno Date: Fri, 9 Aug 2024 15:54:52 -0300 Subject: [PATCH 1/4] Update github-actions-demo.yml --- workflows/github-actions-demo.yml | 36 +++++++++++++------------------ 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/workflows/github-actions-demo.yml b/workflows/github-actions-demo.yml index 0cceaff..ea1e036 100644 --- a/workflows/github-actions-demo.yml +++ b/workflows/github-actions-demo.yml @@ -1,39 +1,33 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - name: CI on: push: - branches: [ "add-materiais-aula" ] - pull_request: branches: [ "main" ] jobs: build: - runs-on: ubuntu-latest - defaults: - run: - working-directory: ./exercicios/para-sala/users-api-aula - strategy: - matrix: - node-version: [18.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - name: Check out the repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 with: - node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm run build --if-present - - run: npm test + username: raissabrizeno + password: dckr_pat_twBu8tCgMEnap1eJZp7Ul4_WrI0 - name: Build and push Docker image uses: docker/build-push-action@v5 with: context: . push: true - tags: raissabrizeno/users-api-aula:1.0.0 \ No newline at end of file + tags: raissabrizeno/users-api-aula:1.0.0 + + - name: Log out from Docker Hub + run: docker logout From 65e7644cc5cf49b664a2db09ec906e02787f33f5 Mon Sep 17 00:00:00 2001 From: Raissa Brizeno Date: Fri, 9 Aug 2024 16:01:13 -0300 Subject: [PATCH 2/4] Update github-actions-demo.yml --- workflows/github-actions-demo.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/workflows/github-actions-demo.yml b/workflows/github-actions-demo.yml index ea1e036..d5912ec 100644 --- a/workflows/github-actions-demo.yml +++ b/workflows/github-actions-demo.yml @@ -3,6 +3,8 @@ name: CI on: push: branches: [ "main" ] + pull_request: + branches: [ "main" ] jobs: build: @@ -25,7 +27,7 @@ jobs: - name: Build and push Docker image uses: docker/build-push-action@v5 with: - context: . + context: ./exercicios/para-sala/users-api-aula push: true tags: raissabrizeno/users-api-aula:1.0.0 From 7d83c09cc643a0ccd72431b89d429b4cc01b190b Mon Sep 17 00:00:00 2001 From: Raissa Brizeno Date: Fri, 9 Aug 2024 16:06:21 -0300 Subject: [PATCH 3/4] Update github-actions-demo.yml --- workflows/github-actions-demo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/github-actions-demo.yml b/workflows/github-actions-demo.yml index d5912ec..6680d3f 100644 --- a/workflows/github-actions-demo.yml +++ b/workflows/github-actions-demo.yml @@ -21,7 +21,7 @@ jobs: - name: Log in to Docker Hub uses: docker/login-action@v2 with: - username: raissabrizeno + username: raissa.brizeno@gmail.com password: dckr_pat_twBu8tCgMEnap1eJZp7Ul4_WrI0 - name: Build and push Docker image From 351f9755e756df8451c8a4f75a9bb7666f75e38c Mon Sep 17 00:00:00 2001 From: Raissa Brizeno Date: Fri, 9 Aug 2024 16:11:36 -0300 Subject: [PATCH 4/4] Update github-actions-demo.yml --- workflows/github-actions-demo.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflows/github-actions-demo.yml b/workflows/github-actions-demo.yml index 6680d3f..28f142a 100644 --- a/workflows/github-actions-demo.yml +++ b/workflows/github-actions-demo.yml @@ -21,8 +21,8 @@ jobs: - name: Log in to Docker Hub uses: docker/login-action@v2 with: - username: raissa.brizeno@gmail.com - password: dckr_pat_twBu8tCgMEnap1eJZp7Ul4_WrI0 + username: raissabrizeno + password: "dckr_pat_FA_dtQWNNB6w7ki2NTKNTwB76U4" - name: Build and push Docker image uses: docker/build-push-action@v5