Only build when target branch is main
All checks were successful
/ cargo test (push) Successful in 22s
All checks were successful
/ cargo test (push) Successful in 22s
This commit is contained in:
parent
5600c653ef
commit
63d7d34116
2 changed files with 24 additions and 19 deletions
24
.forgejo/workflows/docker.yml
Normal file
24
.forgejo/workflows/docker.yml
Normal 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"
|
|
@ -7,22 +7,3 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/rust-toolchain@stable
|
- uses: actions/rust-toolchain@stable
|
||||||
- run: cargo test --all-features
|
- 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"
|
|
Loading…
Reference in a new issue