Only build when target branch is main
All checks were successful
/ cargo test (push) Successful in 22s

This commit is contained in:
Karcsesz 2024-03-18 01:51:52 +01:00
parent 5600c653ef
commit 63d7d34116
2 changed files with 24 additions and 19 deletions

View file

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

View file

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