Skip to content

refactor: use environment variables for Redis connection configuration #2

refactor: use environment variables for Redis connection configuration

refactor: use environment variables for Redis connection configuration #2

Workflow file for this run

name: Build_And_Push
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- name: Test
run: go test -v ./...
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/golang-chat:latest,${{ secrets.DOCKERHUB_USERNAME }}/golang-chat:${{ github.sha }}