From c2a23c0abdfa1ddd6fe47cc8d745a12a87b1d186 Mon Sep 17 00:00:00 2001 From: arsh Date: Tue, 28 May 2024 18:48:01 -0700 Subject: [PATCH] add workflow to publish docker images --- .github/workflows/release-docker.yml | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/release-docker.yml diff --git a/.github/workflows/release-docker.yml b/.github/workflows/release-docker.yml new file mode 100644 index 000000000000..d193ac72452a --- /dev/null +++ b/.github/workflows/release-docker.yml @@ -0,0 +1,45 @@ +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 da-server docker iamge + 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 }}/da-server-celestia:${{ github.ref_name }} + target: da-server-target