-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fdd1964
commit 43ae58d
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Publishing docker images | ||
|
||
on: | ||
push: | ||
branches: ['feat/add-gh-workflow-deploy'] | ||
|
||
env: | ||
API_NAME: luxonis/tools_api | ||
V7_NAME: luxonis/tools_yolov7 | ||
V6R1_NAME: luxonis/tools_yolov6r1 | ||
V6R3_NAME: luxonis/tools_yolov6r3 | ||
|
||
jobs: | ||
ghcr-publish: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get tools version | ||
id: commit | ||
run: echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
|
||
- name: Docker login to GHCR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish latest images | ||
run: | | ||
docker compose build | ||
docker tag tools-api:latest ghcr.io/$API_NAME:test | ||
docker tag tools-yolov7:latest ghcr.io/$V7_NAME:test | ||
docker tag tools-yolov6r1:latest ghcr.io/$V6R1_NAME:test | ||
docker tag tools-yolov6r3:latest ghcr.io/$V6R3_NAME:test | ||
docker push ghcr.io/$API_NAME:latest | ||
docker push ghcr.io/$V7_NAME:latest | ||
docker push ghcr.io/$V6R1_NAME:latest | ||
docker push ghcr.io/$V6R3_NAME:latest | ||
- name: Publish tagged images | ||
run: | | ||
VERSION=${{ steps.commit.outputs.sha }} | ||
docker tag tools-api:latest ghcr.io/$API_NAME:$VERSION | ||
docker tag tools-yolov7:latest ghcr.io/$V7_NAME:$VERSION | ||
docker tag tools-yolov6r1:latest ghcr.io/$V6R1_NAME:$VERSION | ||
docker tag tools-yolov6r3:latest ghcr.io/$V6R3_NAME:$VERSION | ||
docker push ghcr.io/$API_NAME:$VERSION | ||
docker push ghcr.io/$V7_NAME:$VERSION | ||
docker push ghcr.io/$V6R1_NAME:$VERSION | ||
docker push ghcr.io/$V6R3_NAME:$VERSION |