-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (35 loc) · 1.26 KB
/
docker-image-argis-pangeo.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
name: Docker Image CI argis pangeo
# To use this template, change the env variables
# IMAGE_NAME this should be the same name as the folder in which the Dockerfile is
# IMAGE_TAG whatever tag you want to automatically be used
env:
IMAGE_NAME: arcgis-pangeo
IMAGE_TAG: pangeo
on:
workflow_dispatch: null
push:
branches: arcgis-pangeo
paths:
- 'images/arcgis-pangeo/**'
- '.github/workflows/docker-image-arcgis-pangeo.yml'
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v3
- name: Login to GitHub Container Registry
if: github.repository == 'nmfs-opensci/container-images'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build the Docker image
if: github.repository == 'nmfs-opensci/container-images'
run: |
docker build images/$IMAGE_NAME -f images/$IMAGE_NAME/Dockerfile --tag ghcr.io/nmfs-opensci/container-images/$IMAGE_NAME:$IMAGE_TAG
- name: Publish
if: github.repository == 'nmfs-opensci/container-images'
run: |
docker push ghcr.io/nmfs-opensci/container-images/$IMAGE_NAME:$IMAGE_TAG