Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,31 @@ on:
- 'develop'
- 'master'

env:
VERSION: >
${{
inputs.version && inputs.version
|| (github.event_name == 'push' || github.event_name == 'release') && github.ref_name
|| (github.event_name == 'pull_request') && github.head_ref
|| 'latest'
}}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ github.repository }}/robokit
username: ${{ github.actor }}
password: ${{ github.token }}
registry: ghcr.io

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker
run: docker login ghcr.io -u ${{ github.actor }} --password ${{ github.token }}
- name: Build and Push Docker images
run: |
docker buildx build --push \
-t ghcr.io/${{ github.repository }}/robokit:${{ env.VERSION }} \
-t ghcr.io/${{ github.repository }}/robokit:latest \
- name: Show Docker images
run: docker images | grep ${{ github.repository }} || (echo Docker images not found && exit 1)
robokit-deploy:
needs: build
runs-on: ubuntu-latest
Expand Down