Skip to content

Commit 263783e

Browse files
ci: add workflow for legacy branch release (#455)
1 parent d278554 commit 263783e

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish legacy[v0] docker image
2+
on:
3+
push:
4+
branches:
5+
- "legacy"
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Compute new docker image tag
13+
run: |
14+
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
15+
echo "branch=$(echo ${GITHUB_REF_NAME})" >> "$GITHUB_ENV"
16+
echo "docker_tag=$(echo legacy)-$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
17+
- name: Set up Docker Buildx
18+
id: buildx
19+
uses: docker/setup-buildx-action@v2
20+
- name: Login to Github Packages
21+
uses: docker/login-action@v2
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
- name: Build image and push to GitHub Container Registry
27+
uses: docker/build-push-action@v3
28+
with:
29+
# relative path to the place where source code with Dockerfile is located
30+
context: .
31+
push: true
32+
tags: |
33+
ghcr.io/allenneuraldynamics/aind-metadata-mapper:${{ env.docker_tag }}

0 commit comments

Comments
 (0)