Created action to publish test image, added test branch to rust.yml and removed upload build artifact from rust.yml

This commit is contained in:
RaspberryProgramming 2024-07-17 19:15:01 +00:00
parent 0cc94ec48a
commit 66426dd94b
2 changed files with 26 additions and 9 deletions

23
.github/workflows/docker-test.yml vendored Normal file
View File

@ -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 }}

View File

@ -2,9 +2,9 @@ name: Build and Test Rust
on: on:
push: push:
branches: [ "main" ] branches: [ "main", "test"]
pull_request: pull_request:
branches: [ "main" ] branches: [ "main", "test" ]
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
@ -26,10 +26,4 @@ jobs:
- name: Build - name: Build
run: cargo build --release --verbose run: cargo build --release --verbose
- name: Run tests - name: Run tests
run: cargo test --release --verbose 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