From 2d805feb4f86d1ca7983ed6fb2206ea99d1d9c81 Mon Sep 17 00:00:00 2001 From: Florian Kinder Date: Tue, 22 Oct 2024 06:46:18 +0200 Subject: [PATCH] Cleanup github workflows Took 9 minutes --- .github/dependabot.yml | 14 +++++++----- .../{docker_push.yml => docker-build.yml} | 8 ++++++- .github/workflows/docker-description.yml | 1 + .github/workflows/docker.yml | 22 ------------------- .github/workflows/lint.yml | 8 +++++-- .github/workflows/update.yml | 11 +++------- 6 files changed, 26 insertions(+), 38 deletions(-) rename .github/workflows/{docker_push.yml => docker-build.yml} (84%) delete mode 100644 .github/workflows/docker.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b250695b..da491c27 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,7 +1,11 @@ version: 2 updates: -- package-ecosystem: docker - directory: "/docker" - schedule: - interval: daily - open-pull-requests-limit: 10 + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + + - package-ecosystem: docker + directory: "/docker" + schedule: + interval: "daily" diff --git a/.github/workflows/docker_push.yml b/.github/workflows/docker-build.yml similarity index 84% rename from .github/workflows/docker_push.yml rename to .github/workflows/docker-build.yml index cdbd67c6..855181bc 100644 --- a/.github/workflows/docker_push.yml +++ b/.github/workflows/docker-build.yml @@ -4,19 +4,25 @@ on: push: branches: - master + tags: + - latest + pull_request: jobs: build: runs-on: ubuntu-latest steps: + - name: Checkout uses: actions/checkout@v2 + - name: Set up QEMU uses: docker/setup-qemu-action@v3 + - name: build and push if: ${{ env.DOCKER_USERNAME != '' && env.DOCKER_PASSWORD != '' }} env: DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} run: | - ./build.py --push-tags --multiarch + ./build.py --push-tags --multiarch \ No newline at end of file diff --git a/.github/workflows/docker-description.yml b/.github/workflows/docker-description.yml index 9d2709eb..87a762d4 100644 --- a/.github/workflows/docker-description.yml +++ b/.github/workflows/docker-description.yml @@ -11,6 +11,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Docker Hub Description uses: peter-evans/dockerhub-description@v2.4.1 if: ${{ env.DOCKER_USERNAME != '' && env.DOCKER_PASSWORD != '' }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index cf176447..00000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Docker build - -on: - pull_request: - push: - tags: - - latest - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: build - env: - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - run: | - ./build.py --multiarch diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9f961ba0..faea7e56 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,7 +10,9 @@ jobs: shellcheck: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 + - name: shellcheck uses: reviewdog/action-shellcheck@v1 with: @@ -20,7 +22,9 @@ jobs: hadolint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 + - name: hadolint uses: reviewdog/action-hadolint@v1 with: diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index f1342801..0da1c979 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -4,20 +4,15 @@ on: schedule: - cron: "0 * * * *" workflow_dispatch: - inputs: - desc: - description: "desc" - required: false jobs: - build: + check: runs-on: ubuntu-latest if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'factoriotools/factorio-docker') steps: - - uses: actions/checkout@v3 - with: - token: ${{ secrets.REPO_TOKEN }} + - name: Checkout + uses: actions/checkout@v3 - name: Run update script run: ./update.sh