diff --git a/.github/workflows/docker.yml b/.forgejo/workflows/docker.yml similarity index 64% rename from .github/workflows/docker.yml rename to .forgejo/workflows/docker.yml index 2f56c04..e1ee916 100644 --- a/.github/workflows/docker.yml +++ b/.forgejo/workflows/docker.yml @@ -1,22 +1,18 @@ -# GitHub actions workflow which builds and publishes the docker images. - name: Build docker images on: push: - tags: ["v*"] branches: [ main ] - workflow_dispatch: -permissions: - contents: read - packages: write - id-token: write # needed for signing the images with GitHub OIDC Token jobs: build: - if: github.repository == 'ethanaobrien/ew' runs-on: ubuntu-latest steps: + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '18' + - name: Set up QEMU id: qemu uses: docker/setup-qemu-action@v3 @@ -27,21 +23,10 @@ jobs: id: buildx uses: docker/setup-buildx-action@v3 - - name: Inspect builder - run: docker buildx inspect - - - name: Install Cosign - uses: sigstore/cosign-installer@v3.5.0 - - - name: Checkout repository - uses: actions/checkout@v4 - - name: Extract version from Cargo.toml - # Note: explicitly requesting bash will mean bash is invoked with `-eo pipefail`, see - # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell shell: bash run: | - echo "EW_VERSION=$(grep "^version" Cargo.toml | sed -E 's/version\s*=\s*["]([^"]*)["]/\1/')" >> $GITHUB_ENV + echo "EW_VERSION=$(grep "^version" Cargo.toml | sed -E 's/version\s*=\s*["]([^"]*)["]/\1/')" >> $GITHUB_ENV - name: Log in to DockerHub uses: docker/login-action@v3 @@ -54,11 +39,11 @@ jobs: uses: docker/metadata-action@master with: images: | - docker.io/ethanaobrien/ew + docker.io/ethanaobrien/ew flavor: | - latest=false + latest=false tags: | - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} - name: Build and push all platforms id: build-and-push @@ -67,7 +52,7 @@ jobs: push: true labels: | gitsha1=${{ github.sha }} - org.opencontainers.image.version=${{ env.EW_VERSION }} + org.opencontainers.image.version=${{ env.EW_VERSION }} tags: "${{ steps.set-tag.outputs.tags }}" file: "docker/Dockerfile" platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index 3dcf617..0000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,120 +0,0 @@ -name: Rust Build - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - build-x86_64: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '18' - - - name: Install dependencies and build webui - run: | - cd webui - npm install - npm run build - rustup target add x86_64-pc-windows-msvc - - - name: Set up Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - name: Build Rust project for x86_64 - run: cargo build --release --target x86_64-unknown-linux-gnu - - - name: Archive production artifacts for x86_64 - uses: actions/upload-artifact@v3 - with: - name: Linux_x86_64 - path: target/x86_64-unknown-linux-gnu/release/ew - - build-aarch64: - runs-on: ubuntu-latest - strategy: - matrix: - os: [ubuntu-latest] - arch: [aarch64] - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '18' - - - name: Install dependencies and build webui - run: | - cd webui - npm install - npm run build - cd .. - - - name: Set up Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - name: Build Rust project for aarch64 - run: cargo build --release - - - name: Archive production artifacts for aarch64 - uses: actions/upload-artifact@v3 - with: - name: Linux_aarch64 - path: target/release/ew - - build-windows: - runs-on: windows-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '18' - - - name: Install dependencies and build webui - run: | - cd webui - npm install - npm run build - cd .. - rustup target add x86_64-pc-windows-msvc - - - name: Set up Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - name: Build Rust project for Windows - run: cargo build --release --target x86_64-pc-windows-msvc - - - name: Archive production artifacts for Windows - uses: actions/upload-artifact@v3 - with: - name: Windows_x86_64 - path: target\x86_64-pc-windows-msvc\release\ew.exe