Skip to content

Commit d4992d1

Browse files
Add GitHub Actions workflow to push Docker image to GHCR
1 parent b344629 commit d4992d1

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Docker Buildx
17+
uses: docker/setup-buildx-action@v1
18+
19+
- name: Log in to GitHub Container Registry
20+
uses: docker/login-action@v1
21+
with:
22+
registry: ghcr.io
23+
username: ${{ github.actor }}
24+
password: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: Build and push Docker image
27+
uses: docker/build-push-action@v2
28+
with:
29+
context: .
30+
push: true
31+
tags: ghcr.io/${{ github.repository_owner }}/openhands-sandbox:latest

0 commit comments

Comments
 (0)