Skip to content

Commit

Permalink
yq
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <[email protected]>
  • Loading branch information
web-flow authored Feb 11, 2023
1 parent 2453406 commit d2480b5
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 54 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/dependency-updates.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
name: dependency-updates

on:
push:
schedule:
- cron: "0 */6 * * *"
- cron: "0 */6 * * *"
workflow_dispatch:

jobs:
cloudflared-update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: update cloudflared version
id: update
run: |
Expand All @@ -25,7 +22,6 @@ jobs:
)"
sed -i "s|ARG CLOUDFLARED_VERSION=.*|ARG CLOUDFLARED_VERSION=$CLOUDFLARED_VERSION|" ./Dockerfile
echo "version=$CLOUDFLARED_VERSION" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
Expand Down
28 changes: 11 additions & 17 deletions .github/workflows/docker-latest.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Docker push develop to latest

on:
workflow_dispatch:

jobs:
docker:
runs-on: ubuntu-latest
Expand All @@ -13,28 +11,24 @@ jobs:
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ github.token }}

- name: Push develop to latest
run: |
docker buildx imagetools create --tag ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:latest ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ github.ref_name }}
docker buildx imagetools create --tag ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:latest ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:${{ github.ref_name }}
docker buildx imagetools create --tag ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:latest ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ github.ref_name }}
docker buildx imagetools create --tag ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:latest ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:${{ github.ref_name }}
docker buildx imagetools create --tag ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:latest ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ github.ref_name }}
docker buildx imagetools create --tag ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:latest ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:${{ github.ref_name }}
docker buildx imagetools create --tag ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:latest ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ github.ref_name }}
docker buildx imagetools create --tag ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:latest ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:${{ github.ref_name }}
- name: show version
run: |
docker run --rm --entrypoint cloudflared ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:latest version
docker run --rm --entrypoint cloudflared ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:latest version
docker run --rm --entrypoint cloudflared ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:latest version
docker run --rm --entrypoint cloudflared ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:latest version
run: |
docker run --rm --entrypoint cloudflared ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:latest version
docker run --rm --entrypoint cloudflared ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:latest version
docker run --rm --entrypoint cloudflared ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:latest version
docker run --rm --entrypoint cloudflared ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:latest version
- name: trigger cloudflared-dns build
run: |
curl -X POST https://api.github.com/repos/ZoeyVid/cloudflared-dns/dispatches --header "authorization: Bearer ${{ secrets.ACTION_RUN }}" --data '{"event_type": "docker"}'
run: |
curl -X POST https://api.github.com/repos/ZoeyVid/cloudflared-dns/dispatches --header "authorization: Bearer ${{ secrets.ACTION_RUN }}" --data '{"event_type": "docker"}'
42 changes: 13 additions & 29 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Build Docker Image

on:
push:
branches:
branches:
- latest
- develop
paths:
Expand All @@ -15,39 +14,33 @@ on:
- Dockerfile-dns
- .github/workflows/docker.yml
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=-1

- name: Login to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ github.token }}

- name: Build cloudflared
uses: docker/build-push-action@v4
if: ${{ github.event_name != 'pull_request' }}
Expand All @@ -56,10 +49,9 @@ jobs:
file: ./Dockerfile
platforms: linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/amd64/v4,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ github.ref_name }}
ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ github.ref_name }}
tags: |
${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ github.ref_name }}
ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ github.ref_name }}
- name: Build cloudflared-dns
uses: docker/build-push-action@v4
if: ${{ github.event_name != 'pull_request' }}
Expand All @@ -68,23 +60,20 @@ jobs:
file: ./Dockerfile-dns
platforms: linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/amd64/v4,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:${{ github.ref_name }}
ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:${{ github.ref_name }}
tags: |
${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:${{ github.ref_name }}
ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:${{ github.ref_name }}
- name: show version
if: ${{ github.event_name != 'pull_request' }}
run: |
docker run --rm --entrypoint cloudflared ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ github.ref_name }} version
docker run --rm --entrypoint cloudflared ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:${{ github.ref_name }} version
docker run --rm --entrypoint cloudflared ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ github.ref_name }} version
docker run --rm --entrypoint cloudflared ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:${{ github.ref_name }} version
run: |
docker run --rm --entrypoint cloudflared ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ github.ref_name }} version
docker run --rm --entrypoint cloudflared ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:${{ github.ref_name }} version
docker run --rm --entrypoint cloudflared ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ github.ref_name }} version
docker run --rm --entrypoint cloudflared ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:${{ github.ref_name }} version
- name: Set PR-Number (PR)
if: ${{ github.event_name == 'pull_request' }}
id: pr
run: echo "pr=$(echo pr-${{ github.ref_name }} | sed "s/refs\/pull\/://g" | sed "s/\/merge//g")" >> $GITHUB_OUTPUT

- name: Build cloudflared (PR)
uses: docker/build-push-action@v4
if: ${{ github.event_name == 'pull_request' }}
Expand All @@ -94,7 +83,6 @@ jobs:
platforms: linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/amd64/v4,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6
push: ${{ github.event_name == 'pull_request' }}
tags: ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}

- name: Build cloudflared-dns (PR)
uses: docker/build-push-action@v4
if: ${{ github.event_name == 'pull_request' }}
Expand All @@ -104,13 +92,9 @@ jobs:
platforms: linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/amd64/v4,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6
push: ${{ github.event_name == 'pull_request' }}
tags: ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:${{ steps.pr.outputs.pr }}

- name: show version (PR)
if: ${{ github.event_name == 'pull_request' }}
run: |
docker run --rm --entrypoint cloudflared ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }} version
docker run --rm --entrypoint cloudflared ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:${{ steps.pr.outputs.pr }} version
run: "docker run --rm --entrypoint cloudflared ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }} version\ndocker run --rm --entrypoint cloudflared ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-dns:${{ steps.pr.outputs.pr }} version\n \n"
- name: add comment (PR)
uses: mshick/add-pr-comment@v2
if: ${{ github.event_name == 'pull_request' }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/json.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: JSON check

on:
push:
pull_request:
workflow_dispatch:

jobs:
test-json:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
uses: reviewdog/action-misspell@v1
with:
github_token: ${{ secrets.github_token }}
locale: "US"
locale: "US"

0 comments on commit d2480b5

Please sign in to comment.