forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (51 loc) · 2.98 KB
/
docker-push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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")
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