diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml deleted file mode 100644 index d8e5be49..00000000 --- a/.github/workflows/branch.yml +++ /dev/null @@ -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 \ - . diff --git a/.github/workflows/dockerhub-description.yml b/.github/workflows/dockerhub-description.yml index 40c117b9..dfab2a9b 100644 --- a/.github/workflows/dockerhub-description.yml +++ b/.github/workflows/dockerhub-description.yml @@ -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 }} diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index d68b7ef8..92f51816 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -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 diff --git a/.github/workflows/misspell.yml b/.github/workflows/misspell.yml index 1311db32..984cfbf7 100644 --- a/.github/workflows/misspell.yml +++ b/.github/workflows/misspell.yml @@ -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 diff --git a/.github/workflows/pr-fork.yml b/.github/workflows/pr-fork.yml new file mode 100644 index 00000000..f83b40b2 --- /dev/null +++ b/.github/workflows/pr-fork.yml @@ -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 . diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index a1b6df9c..29ee5934 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -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 \ + .