From fae433918d83e3dd9ce3f0766935797a8312a9ce Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 27 Jul 2023 22:43:39 +1000 Subject: [PATCH] actions: Cleaned up duplicate code --- .gitea/workflows/build.yml | 12 ++++++++++-- .gitea/workflows/push.yml | 27 --------------------------- 2 files changed, 10 insertions(+), 29 deletions(-) delete mode 100644 .gitea/workflows/push.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 9c1540e..affda26 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -1,11 +1,14 @@ name: Build Docker -run-name: Build Docker +run-name: Build Docker Image on: [push] jobs: - Build Docker: + CheckFiles: runs-on: ubuntu-latest steps: + - name: Commiter + run: | + echo "Commited by: ${{ gitea.actor }}!" - name: Checkout uses: actions/checkout@v2 - name: Check files @@ -18,6 +21,11 @@ jobs: echo "File $file is correct!" fi done + Build Docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 - name: Build Docker image run : | apt-get install ca-certificates curl gnupg diff --git a/.gitea/workflows/push.yml b/.gitea/workflows/push.yml deleted file mode 100644 index 4be9bd6..0000000 --- a/.gitea/workflows/push.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: OnPush -run-name: ${{ gitea.actor }} has pushed to woodburn repo -on: [push] - -jobs: - CheckFiles: - runs-on: ubuntu-latest - steps: - - name: Commiter - run: | - echo "Commited by: ${{ gitea.actor }}!" - - name: Checkout - uses: actions/checkout@v2 - - name: List HTML files - run: | - ls *.html - - name: Check files - run: | - for file in *.html; do - if grep -q "$file" "$file"; then - echo "File $file contains canonical tag with .html!" - exit 1 - else - echo "File $file is correct!" - fi - done -