Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build on PR's #37

Merged
merged 2 commits into from
Oct 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/test-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ on:
push:
branches: [main]
tags: ["*"]
pull_request:

env:
GO_VERSION: "^1.18.6" # Also update Dockerfile when bumping
GO_VERSION: "1.18" # Also update Dockerfile when bumping
DOCKER_HUB_USER: jenswbebot
DOCKER_HUB_REPO: jenswbe/dead-link-checker
PLATFORMS: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
Expand All @@ -30,6 +31,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
check-latest: true
go-version: ${{ env.GO_VERSION }}

- name: golangci-lint
Expand Down Expand Up @@ -58,18 +60,22 @@ jobs:
run: go test --tags e2e ./...

- name: Set up QEMU
if: github.event_name == 'push'
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
if: github.event_name == 'push'
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
if: github.event_name == 'push'
uses: docker/login-action@v2
with:
username: ${{ env.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Build and push
if: github.event_name == 'push'
uses: docker/build-push-action@v3
with:
context: .
Expand All @@ -79,6 +85,7 @@ jobs:
tags: ${{ env.DOCKER_HUB_REPO }}:${{ steps.vars.outputs.docker_tag }}

- name: Update repo description
if: github.event_name == 'push'
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ env.DOCKER_HUB_USER }}
Expand Down