Skip to content

Prebuild image

Prebuild image #5

Workflow file for this run

# Adapted from:
# https://dev.to/willvelida/pushing-container-images-to-github-container-registry-with-github-actions-1m6b
name: Deploy Images to GHCR
env:
ORG: 'pangeo-forge'
TAG: 'test'
on:
# push:
# branches:
# - main
# workflow_dispatch:
pull_request:
jobs:
push-store-image:
runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: './Store'
steps:
- uses: actions/checkout@v4
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# TODO: export tag
- name: 'Build Inventory Image'
run: |
docker build . --tag ghcr.io/${{ env.ORG }}/deploy-recipe-action:${{ env.TAG }}
docker push ghcr.io/${{ env.ORG }}/deploy-recipe-action:${{ env.TAG }}
- name: 'Prune docker (for testing pull time)' # TODO: remove
run: |
docker rmi -f $(docker images -aq)
docker system prune
- name: 'Pull Image (as test)' # TODO: remove
run: |
docker pull ghcr.io/${{ env.ORG }}/deploy-recipe-action:${{ env.TAG }}