From 94bdf749a1fe7f95625a833addbfda63527a684e Mon Sep 17 00:00:00 2001 From: Mohamed Koubaa Date: Mon, 11 Nov 2024 07:05:31 -0600 Subject: [PATCH] add workflow to publish run image --- .github/workflows/publish-run-image.yml | 44 +++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/publish-run-image.yml diff --git a/.github/workflows/publish-run-image.yml b/.github/workflows/publish-run-image.yml new file mode 100644 index 000000000..0e592b4cf --- /dev/null +++ b/.github/workflows/publish-run-image.yml @@ -0,0 +1,44 @@ +name: Docker images publishing + +on: + workflow_dispatch: + push: + tags: + - "*" + branches: + - main + +env: + REGISTRY: ghcr.io + REPO_NAME: ${{ github.repository }} + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + docker-images: + name: Build the pydyna-run docker image + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to ghcr.io + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and export to Docker + uses: docker/build-push-action@v6 + with: + context: . + file: docker/run/Dockerfile + push: false + tags: ${{ env.REGISTRY }}/pydyna-run:latest + cache-from: type=registry,ref=${{ env.REGISTRY }}/pydyna-run:latest