-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (41 loc) · 1.25 KB
/
build-push-image-nginx.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
---
name: "Build Nginx image and push it to registry"
on:
push:
branches:
- 'development'
- 'dev-update-docker'
paths:
- '.github/workflows/build-push-image-nginx.yml'
- 'docker/images/nginx/**'
jobs:
push-image:
if: github.repository == 'utrechtuniversity/epos-msl'
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Check out EPOS-MSL catalog repository
uses: actions/checkout@v4
with:
path: epos-msl
repository: UtrechtUniversity/epos-msl
ref: ${{ steps.extract_branch.outputs.branch }}
- name: Authenticate to the container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: epos-msl/docker/images/nginx
file: epos-msl/docker/images/nginx/Dockerfile
push: true
tags: ghcr.io/utrechtuniversity/epos-msl-cat-ckan:latest