Skip to content

Merge pull request #133 from douyu/dependabot/go_modules/github.com/d… #55

Merge pull request #133 from douyu/dependabot/go_modules/github.com/d…

Merge pull request #133 from douyu/dependabot/go_modules/github.com/d… #55

Workflow file for this run

name: latest
on:
push:
branches:
- "master"
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: juno-agent-dev
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go 1.19
uses: actions/setup-go@v2
with:
go-version: 1.19
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --clean --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: image_name
run: echo ${{ env.IMAGE_NAME }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: mr-smithers-excellent/[email protected]
with:
registry: ${{ env.REGISTRY }}
image: ${{ env.IMAGE_NAME }}
addLatest: true
dockerfile: Dockerfile
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}