build(deps): bump golang.org/x/crypto from 0.28.0 to 0.31.0 #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/golangci-lint@v1.61.0 | |
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 }} |