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..1b9c376 100644 --- a/.github/workflows/docker.yml +++ b/.forgejo/workflows/docker.yml @@ -1,20 +1,11 @@ -# 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 QEMU @@ -27,21 +18,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 +34,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 +47,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/.forgejo/workflows/rust.yml similarity index 60% rename from .github/workflows/rust.yml rename to .forgejo/workflows/rust.yml index 3dcf617..a829ea6 100644 --- a/.github/workflows/rust.yml +++ b/.forgejo/workflows/rust.yml @@ -13,9 +13,6 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Set up Node.js uses: actions/setup-node@v2 with: @@ -26,7 +23,7 @@ jobs: cd webui npm install npm run build - rustup target add x86_64-pc-windows-msvc + rustup target add x86_64-pc-windows-msvc - name: Set up Rust uses: actions-rs/toolchain@v1 @@ -51,10 +48,6 @@ jobs: os: [ubuntu-latest] arch: [aarch64] - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Set up Node.js uses: actions/setup-node@v2 with: @@ -65,7 +58,7 @@ jobs: cd webui npm install npm run build - cd .. + cd .. - name: Set up Rust uses: actions-rs/toolchain@v1 @@ -82,39 +75,3 @@ jobs: 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