ros2_rmp/.github/workflows/docker-buildx-bake-build.yml

46 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2023-09-26 10:15:09 +00:00
name: Docker Compose Build
on:
push:
branches:
- main # Change this to your main branch name
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
#- name: Set up QEMU
# run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
2023-09-26 10:15:09 +00:00
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
2023-09-26 10:15:09 +00:00
2023-09-26 10:17:02 +00:00
# - name: Login to Docker Hub (if needed)
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
2023-09-26 10:15:09 +00:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
2023-09-26 10:15:09 +00:00
#- name: Login to GitHub Container Registry
# run: echo ${{ secrets.GHCR_PAT }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GHCR_PAT}}
2023-09-26 10:15:09 +00:00
- name: Build and Push Docker Compose Services
run: |
2023-09-26 10:18:18 +00:00
docker buildx bake --push
2023-09-26 10:15:09 +00:00
docker buildx bake -f docker-compose.yml --push
#env:
# COMPOSE_FILE: docker-compose.yml