feat(ci): add docker image push workflow #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 GitHub Actions / Tag and push all dockerInvalid workflow file
|
||
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 |