Skip to content

🔧 chore(.github/workflows/docker-image.yml): update image tags to use… #15

🔧 chore(.github/workflows/docker-image.yml): update image tags to use…

🔧 chore(.github/workflows/docker-image.yml): update image tags to use… #15

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Cache Go modules
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Cache Docker build
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: make tidy
- name: Format code
run: make fmt
- name: install golangci-lint
run: |
GO111MODULE=on go install github.com/golangci/golangci-lint/cmd/[email protected]
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Run static code analysis
run: make lint
- name: Build and push Docker image
run: make docker-push
env:
VERSION: ${{ github.sha }}
GITHUB_USERNAME: ${{ github.actor }}