Skip to content

Commit f920102

Browse files
authored
add a publishing workflow (#1)
1 parent 06b1406 commit f920102

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/packages.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: packages
2+
on:
3+
push:
4+
branches:
5+
- main
6+
tags:
7+
- "*"
8+
workflow_dispatch:
9+
10+
jobs:
11+
docker-build-push:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
packages: write
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
- name: Log in to the Container registry
20+
uses: docker/login-action@v3.4.0
21+
with:
22+
registry: ghcr.io
23+
username: ${{ github.actor }}
24+
password: ${{ secrets.GITHUB_TOKEN }}
25+
- name: Extract metadata (tags, labels) for Docker
26+
id: meta
27+
uses: docker/metadata-action@v5.7.0
28+
with:
29+
images: ghcr.io/IAOCEA/copernicus-marine
30+
- name: Build and push Docker image
31+
uses: docker/build-push-action@v6.15.0
32+
with:
33+
context: .
34+
file: Dockerfile
35+
push: true
36+
tags: ${{ steps.meta.outputs.tags }}
37+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)