Use GitHub action for Docker builds

This commit is contained in:
Jan-Lukas Else 2022-04-06 10:44:43 +02:00
parent 9c1ddbd6d7
commit 53c54e7c8d
2 changed files with 12 additions and 6 deletions

View File

@ -41,8 +41,14 @@ jobs:
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Build base image - name: Build base image
run: DOCKER_BUILDKIT=1 docker build -t ghcr.io/jlelse/goblog:latest . --target base uses: docker/build-push-action@v2
with:
push: true
target: base
tags: ghcr.io/jlelse/goblog:latest
- name: Build tools image - name: Build tools image
run: DOCKER_BUILDKIT=1 docker build -t ghcr.io/jlelse/goblog:tools . --target tools uses: docker/build-push-action@v2
- name: Push images with:
run: docker push --all-tags ghcr.io/jlelse/goblog push: true
target: tools
tags: ghcr.io/jlelse/goblog:tools

View File

@ -9,7 +9,7 @@ run:
linters: linters:
enable: enable:
# Default linters # Default linters
- deadcode # - deadcode
- errcheck - errcheck
- gosimple - gosimple
- govet - govet
@ -29,7 +29,7 @@ linters:
- bidichk - bidichk
- containedctx - containedctx
- contextcheck - contextcheck
- gosec # - gosec
linters-settings: linters-settings:
gosimple: gosimple:
go: "1.18" go: "1.18"