Skip to content

Commit 7d42228

Browse files
committed
Add GitHub Actions workflow to build and push Docker image on push to main
1 parent 132c409 commit 7d42228

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/docker.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build and push Docker image
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
packages: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Log in to GHCR
17+
uses: docker/login-action@v3
18+
with:
19+
registry: ghcr.io
20+
username: ${{ github.actor }}
21+
password: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- name: Build and push
24+
uses: docker/build-push-action@v6
25+
with:
26+
context: .
27+
push: true
28+
tags: ghcr.io/boettiger-lab/carbon-api:latest

0 commit comments

Comments
 (0)