Skip to content

Commit

Permalink
add github action to build nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
fostermh committed Dec 18, 2024
1 parent 5344fc2 commit f073890
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/build-nginx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy Nginx Image to GHCR

on:
push:
paths:
- nginx/**
branches:
- portainer
workflow_dispatch:

jobs:
push-nginx-image:
runs-on: ubuntu-latest
defaults:
run:
working-directory: './hakai_erddap_nginx_proxy'
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@main

- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: hakai-it
password: ${{ secrets.CI_TOKEN }}

- name: 'Build Inventory Image'
run: |
docker build . --tag ghcr.io/hakaiinstitute/hakai_erddap_nginx_proxy:latest
docker push ghcr.io/hakaiinstitute/hakai_erddap_nginx_proxy:latest
2 changes: 1 addition & 1 deletion docker-compose-portainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services :
# must install certbot on host https://certbot.eff.org/instructions?ws=other&os=ubuntufocal
# certbot certonly --webroot
nginx_proxy:
image: nginx_proxy:latest
image: ghcr.io/hakaiinstitute/hakai_erddap_nginx_proxy:latest
build:
context: ./nginx/
dockerfile: Dockerfile
Expand Down

0 comments on commit f073890

Please sign in to comment.