Update docker workflow for forgejo
Some checks failed
Build docker images / build (push) Waiting to run
Rust Build / build-x86_64 (push) Has been cancelled
Rust Build / build-aarch64 (aarch64, ubuntu-latest) (push) Has been cancelled
Rust Build / build-windows (push) Has been cancelled

This commit is contained in:
Ethan O'Brien 2024-07-21 20:32:34 +00:00
parent 5c3b8e936c
commit f4b195fb85

View file

@ -1,20 +1,11 @@
# GitHub actions workflow which builds and publishes the docker images.
name: Build docker images name: Build docker images
on: on:
push: push:
tags: ["v*"]
branches: [ main ] branches: [ main ]
workflow_dispatch:
permissions:
contents: read
packages: write
id-token: write # needed for signing the images with GitHub OIDC Token
jobs: jobs:
build: build:
if: github.repository == 'ethanaobrien/ew'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Set up QEMU - name: Set up QEMU
@ -27,18 +18,7 @@ jobs:
id: buildx id: buildx
uses: docker/setup-buildx-action@v3 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 - 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 shell: bash
run: | 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