cps_loki/.github/workflows/buildx-bake.yml

49 lines
1.3 KiB
YAML
Raw Normal View History

2023-10-16 14:08:28 +00:00
name: Docker Compose Build
on:
push:
branches:
2023-10-16 14:11:10 +00:00
- master # Change this to your main branch name
2023-10-16 14:08:28 +00:00
jobs:
build:
2023-11-21 09:34:57 +00:00
#runs-on: ubuntu-latest
2023-11-21 09:40:45 +00:00
runs-on:
- self-hosted
- ubuntu-latest
2023-10-16 14:08:28 +00:00
steps:
- name: Checkout code
uses: actions/checkout@v4
#- name: Set up QEMU
# run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# - name: Login to Docker Hub (if needed)
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
#- 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}}
- name: Build and Push Docker Compose Services
run: |
docker buildx bake --push
docker buildx bake -f docker-compose.yml --push
#env:
# COMPOSE_FILE: docker-compose.yml