mirror of
https://github.com/elyby/accounts-profiles-endpoint.git
synced 2024-12-22 13:09:51 +05:30
42 lines
831 B
YAML
42 lines
831 B
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
env:
|
|
go_version: 1.21
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Go ${{ env.go_version }}
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: ${{ env.go_version }}
|
|
cache-dependency-path: go.sum
|
|
|
|
- name: Install dependencies
|
|
run: go get .
|
|
|
|
- name: Build
|
|
run: go build ./...
|
|
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
push: true
|
|
tags: ghcr.io/${{ github.repository }}:latest
|