diff --git a/.github/workflows/docker-e2e.yaml b/.github/workflows/docker-e2e.yaml new file mode 100644 index 000000000000..cc9f675773d9 --- /dev/null +++ b/.github/workflows/docker-e2e.yaml @@ -0,0 +1,56 @@ +name: Docker E2E Weekly + +on: + # Trigger every Friday at 00:00 UTC. You can adjust the cron expression as needed. + schedule: + - cron: '0 0 * * 5' + # Allow manual triggering from the Actions tab (useful for testing). + workflow_dispatch: + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: {} + + steps: + - name: Checkout code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + + - name: Set up QEMU + uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 + with: + cache-binary: false + + - name: Extract docker metadata + id: meta + uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0 + with: + images: scrolltech/l2geth + # Force the tag to be 'e2e-test' + tags: | + type=raw,value=e2e-test + flavor: | + latest=false + + - name: Login to Docker Hub + uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 #v3.4.0 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push docker image + uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 + with: + context: . + file: Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + # Use a separate cache scope to avoid polluting the production build cache + # cache-from: type=gha,scope=${{ github.workflow }}-e2e + # cache-to: type=gha,scope=${{ github.workflow }}-e2e \ No newline at end of file