Skip to content

Commit 5a66e3e

Browse files
committed
refact: update gamma cicd
1 parent a8ce8f0 commit 5a66e3e

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

.github/workflows/deploy-beta.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI/CD DataNordeste
22

33
on:
44
push:
5-
branches: ["main"]
5+
branches: ["gamma"]
66

77
jobs:
88
build-image:
@@ -32,9 +32,7 @@ jobs:
3232
push: true
3333
file: Dockerfile.production
3434
labels: ${{ steps.meta.outputs.labels }}
35-
tags: |
36-
${{ vars.DOCKER_IMAGE_BETA }}:latest
37-
${{ steps.meta.outputs.tags }}
35+
tags: ${{ vars.DOCKER_IMAGE_BETA }}:gamma
3836
build-args: |
3937
NEXT_PUBLIC_CONTENTFUL_SPACE=${{ secrets.NEXT_PUBLIC_CONTENTFUL_SPACE }}
4038
NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN=${{ secrets.NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN }}
@@ -46,16 +44,13 @@ jobs:
4644
runs-on: beta-runner
4745
steps:
4846
- name: Pull the latest image
49-
run: sudo docker pull ${{ vars.DOCKER_IMAGE_BETA }}:latest
47+
run: sudo docker pull ${{ vars.DOCKER_IMAGE_BETA }}:gamma
5048

5149
- name: Stop existing container
52-
run: sudo docker rm -f ${{ vars.CONTAINER_NAME_BETA }} || true
50+
run: sudo docker rm -f data-nordeste-gamma || true
5351

5452
- name: Run new container
55-
run: sudo docker run --name ${{ vars.CONTAINER_NAME_BETA }} -p ${{ vars.HOST_PORT_BETA }}:${{ vars.CONTAINER_PORT }} -d ${{ vars.DOCKER_IMAGE_BETA }}:latest
56-
57-
- name: Connect to network
58-
run: docker network connect ${{ vars.NETWORK_NAME }} ${{ vars.CONTAINER_NAME_BETA }}
53+
run: sudo docker run --name data-nordeste-gamma -p 8000:${{ vars.CONTAINER_PORT }} -d ${{ vars.DOCKER_IMAGE_BETA }}:gamma
5954

6055
- name: Prune unused Docker images
6156
run: sudo docker system prune -f

0 commit comments

Comments
 (0)