diff --git a/.github/workflows/docker-dev.yml b/.github/workflows/docker-dev.yml index 905a5870a..ddb8a3427 100644 --- a/.github/workflows/docker-dev.yml +++ b/.github/workflows/docker-dev.yml @@ -1,33 +1,53 @@ -name: Build dev image -concurrency: docker +name: Docker on: push: branches: - main paths-ignore: - - '**/*.md' - - 'docs/**' - - '*.md' - - './github/*' - + - ".github/**" workflow_dispatch: - repository_dispatch: - types: [base-image] - jobs: + build: + strategy: + fail-fast: false - development: name: "Build development image" - uses: rewindio/github-action-ghcr/.github/workflows/build-and-push.yml@v0 - with: - docker_target: development - docker_image_repository: ${{ github.repository }} - platforms: "linux/amd64,linux/arm64" - secrets: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - BUILD_ARGS: | - CONTAINER_REGISTRY_PAT=${{ secrets.REWIND_GITHUB_PACKAGES_READ_ONLY_TOKEN }} - CACHE_REPOSITORY=ghcr.io/${{ github.repository }} - CACHE_TAG=development + runs-on: ubuntu-latest + + env: + NODE_VERSION: 22 + IMAGE_NAME: ghcr.io/${{ github.repository }} + + # OIDC Token permissions & GitHub Packages permissions + permissions: + id-token: write + contents: read + packages: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - 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 Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push to GHCR + uses: docker/build-push-action@v5 + with: + context: . + push: true + platforms: linux/arm64, linux/amd64 + build-args: NODE_VERSION=${{ env.NODE_VERSION }} + tags: ${{ env.IMAGE_NAME }}:development \ No newline at end of file