Skip to content

build: bump dependencies, resolve dependabot issue #20

build: bump dependencies, resolve dependabot issue

build: bump dependencies, resolve dependabot issue #20

name: Build And Release plavatar-rest @ next
on:
push:
branches:
- 'next'
jobs:
build_and_release_nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.22'
- name: Build
run: |
mkdir artifacts
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o artifacts/ ./...
- name: Test
run: |
go test -v ./...
- name: Release Artifact
uses: actions/upload-artifact@v2
with:
name: plavatar-rest
path: artifacts/plavatar-rest
- name: Authenticate Docker
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Lowercase Repository Identifiers
run: |
echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
echo IMAGE_TAG=$(echo ${{ github.ref }} | tr '[:upper:]' '[:lower:]' | awk '{split($0,a,"/"); print a[3]}') >> $GITHUB_ENV
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ env.IMAGE_REPOSITORY }}
- name: Release Docker
uses: docker/build-push-action@v4
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
context: .