Skip to content

feat(ci): add docker image push workflow #1

feat(ci): add docker image push workflow

feat(ci): add docker image push workflow #1

Workflow file for this run

name: Tag and push all docker
on:
workflow_dispatch: {}
pull_request:
push:
tags:
- v*
env:
CARGO_TERM_COLOR: always
DOCKER_USERNAME: ${{ github.actor }}
jobs:
build:
name: build and push
runs-on: ubuntu-20.04
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Log in to Docker
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username ${DOCKER_USERNAME} --password-stdin
- name: Run make golang-docker
run: |
make golang-docker
# TODO: make this into a matrix
- name: Tag image versions
run: |
docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/op-proposer ghcr.io/${{ github.repository_owner }}/op-proposer
docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/op-batcher ghcr.io/${{ github.repository_owner }}/op-batcher
docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/op-challenger ghcr.io/${{ github.repository_owner }}/op-challenger
docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/op-supervisor ghcr.io/${{ github.repository_owner }}/op-supervisor
docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node ghcr.io/${{ github.repository_owner }}/op-node
docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/op-dispute-mon ghcr.io/${{ github.repository_owner }}/op-dispute-mon
- name: Tag versions
if: startsWith(github.ref_name, "v")

Check failure on line 41 in .github/workflows/docker-push.yml

View workflow run for this annotation

GitHub Actions / Tag and push all docker

Invalid workflow file

The workflow is not valid. .github/workflows/docker-push.yml (Line: 41, Col: 13): Unexpected symbol: '"v"'. Located at position 29 within expression: startsWith(github.ref_name, "v")
run: |
docker image tag ghcr.io/${{ github.repository_owner }}/op-challenger ghcr.io/${{ github.repository_owner }}/op-challenger:${{ github.ref_name }}
docker image tag ghcr.io/${{ github.repository_owner }}/op-node ghcr.io/${{ github.repository_owner }}/op-node:${{ github.ref_name }}
docker image tag ghcr.io/${{ github.repository_owner }}/op-dispute-mon ghcr.io/${{ github.repository_owner }}/op-dispute-mon:${{ github.ref_name }}
docker image tag ghcr.io/${{ github.repository_owner }}/op-proposer ghcr.io/${{ github.repository_owner }}/op-proposer:${{ github.ref_name }}
docker image tag ghcr.io/${{ github.repository_owner }}/op-batcher ghcr.io/${{ github.repository_owner }}/op-batcher:${{ github.ref_name }}
docker image tag ghcr.io/${{ github.repository_owner }}/op-supervisor ghcr.io/${{ github.repository_owner }}/op-supervisor:${{ github.ref_name }}
- name: Push images
run: |
docker image push -a ghcr.io/${{ github.repository_owner }}/op-challenger
docker image push -a ghcr.io/${{ github.repository_owner }}/op-node
docker image push -a ghcr.io/${{ github.repository_owner }}/op-dispute-mon
docker image push -a ghcr.io/${{ github.repository_owner }}/op-proposer
docker image push -a ghcr.io/${{ github.repository_owner }}/op-batcher
docker image push -a ghcr.io/${{ github.repository_owner }}/op-supervisor