Skip to content

Commit

Permalink
added workflow:
Browse files Browse the repository at this point in the history
  • Loading branch information
PijusSerapinasMipsas committed Aug 17, 2023
1 parent f2c32db commit fbd18b3
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Main CI/CD
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.19'

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...

build:
needs: test
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v3

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
tags: pspc/starting-point-be:latest

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit fbd18b3

Please sign in to comment.