Skip to content

Commit

Permalink
add workflow to publish docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
arshsingh committed May 16, 2024
1 parent 11fca6b commit 0c4968f
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/release-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Docker

on:
release:
types: [published]

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- name: set up QEMU
uses: docker/setup-qemu-action@v3

- name: set up docker buildx
uses: docker/setup-buildx-action@v3

- name: login to github packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: set docker respository
env:
OWNER: ${{ github.repository_owner }}
run: echo "DOCKER_REPO=ghcr.io/${OWNER,,}" >> $GITHUB_ENV

- name: set commit date
id: set_commit_date
run: echo "GIT_DATE=$(git show -s --format='%ct')" >> $GITHUB_ENV

- name: build op-stack-go docker image
uses: docker/build-push-action@v5
with:
context: .
file: ops/docker/op-stack-go/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.DOCKER_REPO }}/op-stack-go:${{ github.ref_name }}
build-args: |
GIT_COMMIT=${{ github.sha }}
GIT_DATE=${{ env.GIT_DATE }}
GIT_VERSION=${{ github.ref_name }}
- name: build op-node docker iamge
uses: docker/build-push-action@v5
with:
context: .
file: op-node/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.DOCKER_REPO }}/op-node:${{ github.ref_name }}
build-args: |
OP_STACK_GO_BUILDER=${{ env.DOCKER_REPO }}/op-stack-go:${{ github.ref_name }}
- name: build op-node docker iamge
uses: docker/build-push-action@v5
with:
context: .
file: op-batcher/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.DOCKER_REPO }}/op-batcher:${{ github.ref_name }}
build-args: |
OP_STACK_GO_BUILDER=${{ env.DOCKER_REPO }}/op-stack-go:${{ github.ref_name }}

0 comments on commit 0c4968f

Please sign in to comment.