From 63d2aadfebe6486f1ad529525eba9bd241eaa7b3 Mon Sep 17 00:00:00 2001 From: Yann Soubeyrand Date: Fri, 19 Jul 2024 17:34:19 +0200 Subject: [PATCH] ci: use released setup-dagger action --- .github/actions/post-setup-dagger/action.yaml | 12 ----- .github/actions/setup-dagger/action.yaml | 49 ------------------- .github/workflows/build.yaml | 11 ++--- 3 files changed, 3 insertions(+), 69 deletions(-) delete mode 100644 .github/actions/post-setup-dagger/action.yaml delete mode 100644 .github/actions/setup-dagger/action.yaml diff --git a/.github/actions/post-setup-dagger/action.yaml b/.github/actions/post-setup-dagger/action.yaml deleted file mode 100644 index 657ae19..0000000 --- a/.github/actions/post-setup-dagger/action.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -name: "Post Setup Dagger" -description: "Post Setup Dagger" -runs: - using: "composite" - steps: - - name: "Stop engine" - id: "stop-engine" - shell: "sh" - run: | - docker stop --time 60 'dagger-engine' - docker logs 'dagger-engine' diff --git a/.github/actions/setup-dagger/action.yaml b/.github/actions/setup-dagger/action.yaml deleted file mode 100644 index afb4bd1..0000000 --- a/.github/actions/setup-dagger/action.yaml +++ /dev/null @@ -1,49 +0,0 @@ ---- -name: "Setup Dagger" -description: "Setup Dagger" -inputs: - version: - description: | - "Dagger version to install" - default: "0.9.5" - cloudToken: - description: | - "Dagger cloud token" - required: true - cacheServiceURL: - description: | - "Dagger cache service URL" - default: "https://api.dagger.cloud/magicache" - cacheServiceToken: - description: | - "Dagger cache service token" - required: true -runs: - using: "composite" - steps: - - name: "Install CLI" - id: "install-cli" - shell: "sh" - env: - DAGGER_VERSION: "${{ inputs.version }}" - run: | - cd '/usr/local' - curl -L 'https://dl.dagger.io/dagger/install.sh' | sudo -E sh - - - name: "Start engine" - id: "start-engine" - shell: "sh" - run: | - docker run \ - --name 'dagger-engine' \ - --detach \ - --stop-signal 'SIGTERM' \ - --privileged \ - --volume 'dagger-engine:/var/lib/dagger' \ - --env '_EXPERIMENTAL_DAGGER_SERVICES_DNS' \ - --env '_EXPERIMENTAL_DAGGER_CACHESERVICE_URL=${{ inputs.cacheServiceURL }}' \ - --env '_EXPERIMENTAL_DAGGER_CACHESERVICE_TOKEN=${{ inputs.cacheServiceToken }}' \ - 'registry.dagger.io/engine:v${{ inputs.version }}' - - echo '_EXPERIMENTAL_DAGGER_RUNNER_HOST=docker-container://dagger-engine' >> "$GITHUB_ENV" - echo '_EXPERIMENTAL_DAGGER_CLOUD_TOKEN=${{ inputs.cloudToken }}' >> "$GITHUB_ENV" diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2557cfe..9981c4a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,12 +19,11 @@ jobs: - name: "Checkout repository" id: "checkout" uses: "actions/checkout@v4" - - name: "Setup Dagger" + - name: "Set up Dagger" id: "setup-dagger" - uses: "./.github/actions/setup-dagger" + uses: "camptocamp/setup-dagger@v1" with: - cloudToken: "${{ secrets.DAGGER_CLOUD_TOKEN }}" - cacheServiceToken: "${{ secrets.DAGGER_CACHE_SERVICE_TOKEN }}" + cloud-token: "${{ secrets.DAGGER_CLOUD_TOKEN }}" - name: "Build container image" id: "build-image" run: | @@ -37,7 +36,3 @@ jobs: package-type: "container" min-versions-to-keep: 0 delete-only-untagged-versions: true - # NOTE: Composite actions cannot add post steps, so add them explicitly. - - name: "Post Setup Dagger" - id: "post-setup-dagger" - uses: "./.github/actions/post-setup-dagger"