Skip to content

Commit

Permalink
feat: upload image to Digital Ocean
Browse files Browse the repository at this point in the history
  • Loading branch information
JossDuff committed Oct 24, 2024
1 parent 194653e commit adb4a21
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 27 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/build-docker-image.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build and Push op-geth

on:
push:
branches:
- optimism

env:
REGISTRY: "registry.digitalocean.com/sigil"

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build container image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: false
tags: ${{ env.REGISTRY }}/op-geth:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

- name: Log in to DO Container Registry
run: doctl registry login --expiry-seconds 1200

- name: Push image to DO Container Registry
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ env.REGISTRY }}/op-geth:${{ github.sha }}
${{ env.REGISTRY }}/op-geth:latest

0 comments on commit adb4a21

Please sign in to comment.