Skip to content

Modular logistics and supply chain operating system (LSOS)

always build on main and tags and PRs

Eugene Dementyev2d905e50c982
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a6af8464..8ce4ce76 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -7,16 +7,11 @@ on:
- 'v*'
pull_request:
branches: [ main ]
-env:
- REGISTRY: ghcr.io/fleetbase
jobs:
build:
name: Build and Start Docker Services
runs-on: ubuntu-latest
- permissions:
- contents: read
- packages: write
steps:
- name: Checkout Code
@@ -27,34 +22,8 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- - name: Log in to the Container registry
- uses: docker/login-action@v2
- with:
- registry: ${{ env.REGISTRY }}
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Extract metadata (tags, labels) for Docker
- id: meta
- uses: docker/metadata-action@v4
- with:
- # this will be replaced by docker buildx bake with an empty line
- # to get just tags without the image name
- images: |
- willbereplaced
- tags: |
- type=edge,branch=main
- type=semver,pattern={{version}}
- type=semver,pattern={{major}}.{{minor}}
-
- name: Build and release
- if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && success()
- env:
- # get tags from the json object and pass as a string-encoded list
- tags: "${{ toJSON(fromJSON(steps.meta.outputs.json).tags) }}"
uses: docker/bake-action@v2
with:
- push: true
files: |
./docker-bake.hcl
- ${{ steps.meta.outputs.bake-file }}