Skip to content

Commit f621d99

Browse files
committed
Add GHA workflow to publish the Compose file
1 parent 9dec2ed commit f621d99

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-push:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
# Ensure Compose v2.39.3+ is available (includes bug fixes for publishing)
16+
# Can remove this action once default runners include it
17+
- name: Set up Docker Compose
18+
uses: docker/setup-compose-action@v1
19+
with:
20+
version: v2.39.3
21+
22+
- name: Log in to DockerHub
23+
uses: docker/login-action@v3
24+
with:
25+
username: ${{ secrets.DOCKERHUB_USERNAME }}
26+
password: ${{ secrets.DOCKERHUB_TOKEN }}
27+
28+
- name: Publish Compose file
29+
run: |
30+
docker compose -f oci://dockersamples/labspace -f .labspace/compose.override.yaml publish $DOCKERHUB_USERNAME/labspace-container-supported-development --with-env -y

0 commit comments

Comments
 (0)