-
Notifications
You must be signed in to change notification settings - Fork 6
47 lines (44 loc) · 1.8 KB
/
release-loading.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
35
36
37
38
39
40
41
42
43
44
45
46
47
name: 'Publish nodenorm-loading to GitHub Packages'
on:
release:
types: [published]
env:
REGISTRY: ghcr.io
jobs:
push_to_registry:
name: Push Docker image for NodeNorm loading to GitHub Packages tagged with "latest" and version number.
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images:
ghcr.io/${{ github.repository }}-data-loading
# This will leave authentication information, but that shouldn't be relevant here.
- name: Login to ghcr
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Push to GitHub Packages
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:data-loading"
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: BRANCH_NAME=${{ github.event.release.target_commitish }}