CI: Further reworking of workflows
This commit is contained in:
52
.github/workflows/branch.yml
vendored
52
.github/workflows/branch.yml
vendored
@@ -1,52 +0,0 @@
|
||||
name: branch
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "*"
|
||||
- "!master"
|
||||
paths:
|
||||
- .github/workflows/branch.yml
|
||||
- cmd/**
|
||||
- internal/**
|
||||
- .dockerignore
|
||||
- .golangci.yml
|
||||
- Dockerfile
|
||||
- go.mod
|
||||
- go.sum
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- env:
|
||||
DOCKER_BUILDKIT: "1"
|
||||
run: docker build --target test .
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- env:
|
||||
DOCKER_BUILDKIT: "1"
|
||||
run: docker build --target lint .
|
||||
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [test, lint]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- name: Dockerhub login
|
||||
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u qmcgaw --password-stdin 2>&1
|
||||
- name: Docker build
|
||||
run: |
|
||||
docker buildx build \
|
||||
--platform=linux/amd64,linux/386,linux/arm64,linux/arm/v6,linux/arm/v7,linux/s390x,linux/ppc64le \
|
||||
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
|
||||
--build-arg COMMIT=`git rev-parse --short HEAD` \
|
||||
--build-arg VERSION="branch-${GITHUB_REF##*/}" \
|
||||
-t qmcgaw/gluetun:branch-${GITHUB_REF##*/} \
|
||||
--push \
|
||||
.
|
||||
2
.github/workflows/dockerhub-description.yml
vendored
2
.github/workflows/dockerhub-description.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Docker Hub Description
|
||||
uses: peter-evans/dockerhub-description@v2.4.1
|
||||
uses: peter-evans/dockerhub-description@v2
|
||||
with:
|
||||
username: qmcgaw
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
11
.github/workflows/labels.yml
vendored
11
.github/workflows/labels.yml
vendored
@@ -9,10 +9,7 @@ jobs:
|
||||
labeler:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Labeler
|
||||
if: success()
|
||||
uses: crazy-max/ghaction-github-labeler@v3.1.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: actions/checkout@v2
|
||||
- uses: crazy-max/ghaction-github-labeler@v3
|
||||
with:
|
||||
yaml-file: .github/labels.yml
|
||||
|
||||
3
.github/workflows/misspell.yml
vendored
3
.github/workflows/misspell.yml
vendored
@@ -9,8 +9,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: reviewdog/action-misspell@master
|
||||
- uses: reviewdog/action-misspell@v1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
locale: "US"
|
||||
level: error
|
||||
|
||||
40
.github/workflows/pr-fork.yml
vendored
Normal file
40
.github/workflows/pr-fork.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Pull request
|
||||
on:
|
||||
pull_request_target:
|
||||
branches: [master]
|
||||
paths:
|
||||
- .github/workflows/pr-fork.yml
|
||||
- cmd/**
|
||||
- internal/**
|
||||
- .dockerignore
|
||||
- .golangci.yml
|
||||
- Dockerfile
|
||||
- go.mod
|
||||
- go.sum
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- env:
|
||||
DOCKER_BUILDKIT: "1"
|
||||
run: docker build --target test .
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- env:
|
||||
DOCKER_BUILDKIT: "1"
|
||||
run: docker build --target lint .
|
||||
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [test, lint]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Docker build
|
||||
env:
|
||||
DOCKER_BUILDKIT: "1"
|
||||
run: docker build .
|
||||
18
.github/workflows/pr.yml
vendored
18
.github/workflows/pr.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: pull request
|
||||
name: Pull request
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
@@ -34,7 +34,17 @@ jobs:
|
||||
needs: [test, lint]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- name: Dockerhub login
|
||||
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u qmcgaw --password-stdin 2>&1
|
||||
- name: Docker build
|
||||
env:
|
||||
DOCKER_BUILDKIT: "1"
|
||||
run: docker build .
|
||||
run: |
|
||||
docker buildx build \
|
||||
--platform=linux/amd64,linux/386,linux/arm64,linux/arm/v6,linux/arm/v7,linux/s390x,linux/ppc64le \
|
||||
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
|
||||
--build-arg COMMIT=`git rev-parse --short HEAD` \
|
||||
--build-arg VERSION="branch-${GITHUB_REF##*/}" \
|
||||
-t qmcgaw/gluetun:branch-${GITHUB_REF##*/} \
|
||||
--push \
|
||||
.
|
||||
|
||||
Reference in New Issue
Block a user