From 63d7d34116fe22f6ffbd1c6fa17c1a43036a96db Mon Sep 17 00:00:00 2001 From: Karcsesz Date: Mon, 18 Mar 2024 01:51:52 +0100 Subject: [PATCH] Only build when target branch is main --- .forgejo/workflows/docker.yml | 24 ++++++++++++++++++++++++ .forgejo/workflows/test.yml | 19 ------------------- 2 files changed, 24 insertions(+), 19 deletions(-) create mode 100644 .forgejo/workflows/docker.yml diff --git a/.forgejo/workflows/docker.yml b/.forgejo/workflows/docker.yml new file mode 100644 index 0000000..370247f --- /dev/null +++ b/.forgejo/workflows/docker.yml @@ -0,0 +1,24 @@ +on: + push: + branches: + - main +jobs: + docker: + name: docker build + runs-on: ubuntu-22.04 + needs: + - test + steps: + - uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME}} + password: ${{ secrets.DOCKERHUB_TOKEN}} + - uses: docker/build-push-action@v5 + with: + push: true + tags: karcsesz/fingerlink:latest + - uses: docker/build-push-action@v5 + with: + push: true + tags: karcsesz/fingerlink:latest-nano + build-args: "editor=nano" \ No newline at end of file diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 80fee57..72615a2 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -7,22 +7,3 @@ jobs: - uses: actions/checkout@v4 - uses: actions/rust-toolchain@stable - run: cargo test --all-features - docker: - name: docker build - runs-on: ubuntu-22.04 - needs: - - test - steps: - - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME}} - password: ${{ secrets.DOCKERHUB_TOKEN}} - - uses: docker/build-push-action@v5 - with: - push: false - tags: karcsesz/fingerlink:latest - - uses: docker/build-push-action@v5 - with: - push: false - tags: karcsesz/fingerlink:latest-nano - build-args: "editor=nano" \ No newline at end of file