From 66426dd94bb24c478bb2c8e78057e469581f7a53 Mon Sep 17 00:00:00 2001 From: RaspberryProgramming Date: Wed, 17 Jul 2024 19:15:01 +0000 Subject: [PATCH] Created action to publish test image, added test branch to rust.yml and removed upload build artifact from rust.yml --- .github/workflows/docker-test.yml | 23 +++++++++++++++++++++++ .github/workflows/rust.yml | 12 +++--------- 2 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/docker-test.yml diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml new file mode 100644 index 0000000..dfee01b --- /dev/null +++ b/.github/workflows/docker-test.yml @@ -0,0 +1,23 @@ +name: Build and Publish Test Docker Image + +on: + push: + branches: [ "test"] + pull_request: + branches: [ "test" ] + +jobs: + + build: + runs-on: self-hosted + steps: + - uses: actions/checkout@v4 + - run: docker build . -t raspberrypi99/request-mirror + - name: Dockerize + if: success() + uses: manusa/actions-publish-docker@v1.1.2 + with: + name: raspberrypi99/request-mirror + tag: test + username: ${{ secrets.docker_hub_username }} + password: ${{ secrets.docker_hub_password }} diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 59c2a1a..e06d0b9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,9 +2,9 @@ name: Build and Test Rust on: push: - branches: [ "main" ] + branches: [ "main", "test"] pull_request: - branches: [ "main" ] + branches: [ "main", "test" ] env: CARGO_TERM_COLOR: always @@ -26,10 +26,4 @@ jobs: - name: Build run: cargo build --release --verbose - name: Run tests - run: cargo test --release --verbose - - name: Upload a Build Artifact - uses: actions/upload-artifact@v4.3.4 - with: - name: linux-build - path: target/release/request-mirror - \ No newline at end of file + run: cargo test --release --verbose \ No newline at end of file