-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (33 loc) · 1.17 KB
/
publish_dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Publish dev
on:
push:
branches:
- dev
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Compute new docker image tag
run: |
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
echo "branch=$(echo ${GITHUB_REF_NAME})" >> "$GITHUB_ENV"
echo "docker_tag=$(echo ${GITHUB_REF_NAME})-$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to Github Packages
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image and push to GitHub Container Registry
uses: docker/build-push-action@v3
with:
# relative path to the place where source code with Dockerfile is located
context: .
push: true
tags: |
ghcr.io/allenneuraldynamics/aind-data-transfer-service:${{ env.docker_tag }}
ghcr.io/allenneuraldynamics/aind-data-transfer-service:dev