diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index c706aa0..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: 2 -registries: - github-emma: - type: git - url: https://github.com - username: x-access-token - password: ${{secrets.PAT}} -updates: - - package-ecosystem: github-actions - directory: "/" - schedule: - interval: daily - - package-ecosystem: pip - directory: "/" - insecure-external-code-execution: allow - versioning-strategy: lockfile-only - registries: - - github-emma - schedule: - interval: daily diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 8993111..3185963 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -28,6 +28,23 @@ jobs: packages: write steps: + - name: Get latest release tag + id: release-tag + uses: rez0n/actions-github-release@main + env: + token: ${{ secrets.GITHUB_TOKEN }} + repository: ${{ github.repository }} + type: "stable" + + - name: Define image tag + id: image-tag + env: + RELEASE_VERSION: ${{ steps.release-tag.outputs.release }} + run: | + IMAGE_TAG=$(echo "$RELEASE_VERSION" | cut -d v -f 2) + IMAGE_TAG=$(echo "$IMAGE_TAG$TORCH_VERSION_SUFFIX" | tr + -) + echo "tag=$IMAGE_TAG" >> "$GITHUB_OUTPUT" + - name: Check out the repository uses: actions/checkout@v4 @@ -44,8 +61,8 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.REPOSITORY }} tags: | - type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} - type=raw,value=latest,enable={{is_default_branch}} + type=raw,value=${{steps.image-tag.outputs.tag}},enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + type=raw,value=${{steps.image-tag.outputs.tag}},enable={{is_default_branch}} - name: Build and push image uses: docker/build-push-action@v5 @@ -58,15 +75,3 @@ jobs: BASE_IMAGE_NAME=${{ env.REGISTRY }}/{{ env.BASE_IMAGE }} BUILDER_IMAGE_NAME=${{ env.REGISTRY }}/{{ env.BUILDER_IMAGE }} TORCH_VERSION_SUFFIX=${{ matrix.torch_version_suffix }} - - - name: Build, tag, and push the docker image - env: - REGISTRY: ${{ steps.login-ecr.outputs.registry }} - BASE_IMAGE_NAME: ${{ steps.login-ecr.outputs.registry }}/emma/base - BUILDER_IMAGE_NAME: ${{ steps.login-ecr.outputs.registry }}/emma/builder - RELEASE_VERSION: ${{ steps.release-tag.outputs.release }} - TORCH_VERSION_SUFFIX: ${{ matrix.torch_version_suffix }} - run: | - IMAGE_TAG=$(echo "$RELEASE_VERSION" | cut -d v -f 2) - IMAGE_TAG=$(echo "$IMAGE_TAG$TORCH_VERSION_SUFFIX" | tr + -) - docker build --build-arg BUILDER_IMAGE_NAME --build-arg BASE_IMAGE_NAME --build-arg TORCH_VERSION_SUFFIX --push -t $REGISTRY/$REPOSITORY:$IMAGE_TAG . diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 3bb0338..2287e35 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -14,7 +14,7 @@ env: jobs: changes: name: Check for Python file changes - runs-on: self-hosted + runs-on: ubuntu-latest if: ${{ !github.event.pull_request.draft }} outputs: python: ${{steps.filter.outputs.python}} @@ -37,7 +37,7 @@ jobs: name: Type check Python needs: [changes] if: ${{needs.changes.outputs.python == 'true' && !github.event.pull_request.draft }} - runs-on: self-hosted + runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v3 @@ -113,7 +113,7 @@ jobs: name: Lint Python needs: [changes] if: ${{needs.changes.outputs.python == 'true' && !github.event.pull_request.draft }} - runs-on: self-hosted + runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v3 @@ -172,7 +172,7 @@ jobs: format: name: Format - runs-on: self-hosted + runs-on: ubuntu-latest if: ${{ !github.event.pull_request.draft }} steps: - name: Checkout repository diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml index 0748930..2c917a9 100644 --- a/.github/workflows/pr-lint.yml +++ b/.github/workflows/pr-lint.yml @@ -10,7 +10,7 @@ on: jobs: main: name: Validate PR title - runs-on: self-hosted + runs-on: ubuntu-latest steps: - name: Validate PR title uses: amannn/action-semantic-pull-request@v5 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 226d034..518bd6d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,7 +19,7 @@ env: jobs: changes: name: Check for Python file changes - runs-on: self-hosted + runs-on: ubuntu-latest if: ${{ !github.event.pull_request.draft }} outputs: python: ${{steps.filter.outputs.python}} @@ -43,7 +43,7 @@ jobs: run: shell: bash - runs-on: self-hosted + runs-on: ubuntu-latest needs: [changes] if: ${{needs.changes.outputs.python == 'true' && !github.event.pull_request.draft }} steps: