Skip to content

build & deploy Docker image #35

build & deploy Docker image

build & deploy Docker image #35

name: build & deploy Docker image
on:
workflow_dispatch:
push:
branches:
- deploy
env:
DOCKER_IMAGE: registry.gitlab.tpwd.de/tpwd/bb-navi/amarillo
DOCKER_TAG: production
jobs:
docker-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
registry: git.bbnavi.de
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: git.bbnavi.de/bbnavi-reg/ocpdb-proxy:latest
deploy:
runs-on: self-hosted
needs:
- prep

Check failure on line 32 in .github/workflows/docker-build-deploy.yml

View workflow run for this annotation

GitHub Actions / build & deploy Docker image

Invalid workflow file

The workflow is not valid. .github/workflows/docker-build-deploy.yml (Line: 32, Col: 9): Job 'deploy' depends on unknown job 'prep'.
environment: production
env:
ADMIN_TOKEN: ${{ secrets.ADMIN_TOKEN }}
RIDE2GO_TOKEN: ${{ secrets.RIDE2GO_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: generate Docker stack markup
run: |
set -o pipefail
docker-compose -f quantum-stack.yml config | tee stack.yml
echo -e "---\nversion: '1.0'\ncompose: stack.yml" >.quantum
- name: Deploy to swarm
uses: sagebind/docker-swarm-deploy-action@v2
with:
remote_host: ssh://ec2-user@3.79.201.75
ssh_private_key: ${{ secrets.AWS_SSH_PRIVATE_KEY }}
ssh_public_key: ${{ secrets.AWS_SSH_MANAGER_PUBKEY }}
args: stack deploy --compose-file .quantum bbnavi-amarillo
# - name: Deploy to Planetary Quantum
# run: |
# set -x
# docker run --rm -i \
# -v $PWD:/app -w /app \
# -e QUANTUM_USER -e QUANTUM_PASSWORD -e QUANTUM_ENDPOINT -e QUANTUM_STACK \
# r.planetary-quantum.com/quantum-public/cli:2 \
# quantum-cli stacks update --create --wait