mirror of
https://github.com/static-web-server/static-web-server.git
synced 2026-01-25 05:06:33 +00:00
refactor: update github ci workflows (#514)
It updates all GitHub CI workflow dependencies to their corresponding latest stable versions and improves them when necessary.
This commit is contained in:
2
.github/workflows/audit.yml
vendored
2
.github/workflows/audit.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
audit:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
|
||||
2
.github/workflows/devel.code-analyzer.yml
vendored
2
.github/workflows/devel.code-analyzer.yml
vendored
@@ -58,7 +58,7 @@ jobs:
|
||||
cargo clippy --all-features --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
|
||||
|
||||
- name: Upload analysis results to GitHub
|
||||
uses: github/codeql-action/upload-sarif@v2
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
with:
|
||||
sarif_file: rust-clippy-results.sarif
|
||||
wait-for-processing: true
|
||||
|
||||
28
.github/workflows/devel.docker.yml
vendored
28
.github/workflows/devel.docker.yml
vendored
@@ -43,12 +43,12 @@ jobs:
|
||||
sudo apt-get install jq
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
-
|
||||
name: Cache Docker layers
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: static-web-server-${{ matrix.arch }}-alpine-buildx-${{ github.sha }}
|
||||
@@ -56,11 +56,11 @@ jobs:
|
||||
static-web-server-${{ matrix.arch }}-alpine-buildx-
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
uses: docker/setup-qemu-action@v3
|
||||
-
|
||||
name: Docker meta alpine
|
||||
id: meta_alpine
|
||||
uses: docker/metadata-action@v4
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.DOCKER_IMAGE }}
|
||||
flavor: |
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
type=sha
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver-opts: network=host
|
||||
-
|
||||
@@ -91,7 +91,7 @@ jobs:
|
||||
echo "SERVER_DOCKERFILE=./docker/alpine/Dockerfile" >> $GITHUB_ENV
|
||||
-
|
||||
name: Build and export to Docker client
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
platforms: ${{ matrix.arch }}
|
||||
@@ -103,7 +103,7 @@ jobs:
|
||||
SERVER_VERSION=${{ env.SERVER_VERSION }}
|
||||
-
|
||||
name: Build and push to local registry
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
platforms: ${{ matrix.arch }}
|
||||
@@ -158,12 +158,12 @@ jobs:
|
||||
sudo apt-get install jq
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
-
|
||||
name: Cache Docker layers
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: static-web-server-${{ matrix.arch }}-debian-buildx-${{ github.sha }}
|
||||
@@ -171,11 +171,11 @@ jobs:
|
||||
static-web-server-${{ matrix.arch }}-debian-buildx-
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
uses: docker/setup-qemu-action@v3
|
||||
-
|
||||
name: Docker meta debian
|
||||
id: meta_debian
|
||||
uses: docker/metadata-action@v4
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.DOCKER_IMAGE }}
|
||||
flavor: |
|
||||
@@ -191,7 +191,7 @@ jobs:
|
||||
type=sha
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver-opts: network=host
|
||||
-
|
||||
@@ -206,7 +206,7 @@ jobs:
|
||||
echo "SERVER_DOCKERFILE=./docker/debian/Dockerfile" >> $GITHUB_ENV
|
||||
-
|
||||
name: Build and export to Docker client
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
platforms: ${{ matrix.arch }}
|
||||
@@ -218,7 +218,7 @@ jobs:
|
||||
SERVER_VERSION=${{ env.SERVER_VERSION }}
|
||||
-
|
||||
name: Build and push to local registry
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
platforms: ${{ matrix.arch }}
|
||||
|
||||
2
.github/workflows/devel.yml
vendored
2
.github/workflows/devel.yml
vendored
@@ -170,7 +170,7 @@ jobs:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Cache Rust Cargo/Toolchain
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo
|
||||
|
||||
2
.github/workflows/release.build.manual.yml
vendored
2
.github/workflows/release.build.manual.yml
vendored
@@ -116,7 +116,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
|
||||
2
.github/workflows/release.crate.yml
vendored
2
.github/workflows/release.crate.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
environment: crates-io-static-web-server
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
|
||||
14
.github/workflows/release.docker.manual.yml
vendored
14
.github/workflows/release.docker.manual.yml
vendored
@@ -16,12 +16,12 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
uses: docker/setup-qemu-action@v3
|
||||
-
|
||||
name: Prepare Docker envs
|
||||
shell: bash
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
-
|
||||
name: Docker meta debian
|
||||
id: meta_debian
|
||||
uses: docker/metadata-action@v4
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
joseluisq/static-web-server
|
||||
@@ -48,23 +48,23 @@ jobs:
|
||||
type=raw,value=${{ env.SEMVER_MINOR }}-debian
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Login to ghcr.io
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
-
|
||||
name: Build and push (debian)
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: .
|
||||
|
||||
42
.github/workflows/release.docker.yml
vendored
42
.github/workflows/release.docker.yml
vendored
@@ -11,16 +11,16 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
uses: docker/setup-qemu-action@v3
|
||||
-
|
||||
name: Docker meta alpine
|
||||
id: meta_alpine
|
||||
uses: docker/metadata-action@v4
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
joseluisq/static-web-server
|
||||
@@ -34,16 +34,16 @@ jobs:
|
||||
type=semver,pattern={{major}}
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Login to ghcr.io
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
echo "SERVER_VERSION=${GITHUB_REF##*/v}" >> $GITHUB_ENV
|
||||
-
|
||||
name: Build and push (alpine)
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: .
|
||||
@@ -72,16 +72,16 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
uses: docker/setup-qemu-action@v3
|
||||
-
|
||||
name: Docker meta debian
|
||||
id: meta_debian
|
||||
uses: docker/metadata-action@v4
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
joseluisq/static-web-server
|
||||
@@ -95,16 +95,16 @@ jobs:
|
||||
type=semver,pattern={{major}}
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Login to ghcr.io
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
@@ -116,7 +116,7 @@ jobs:
|
||||
echo "SERVER_VERSION=${GITHUB_REF##*/v}" >> $GITHUB_ENV
|
||||
-
|
||||
name: Build and push (debian)
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: .
|
||||
@@ -132,16 +132,16 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
uses: docker/setup-qemu-action@v3
|
||||
-
|
||||
name: Docker meta scratch
|
||||
id: meta_scratch
|
||||
uses: docker/metadata-action@v4
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
joseluisq/static-web-server
|
||||
@@ -152,16 +152,16 @@ jobs:
|
||||
type=semver,pattern={{major}}
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Login to ghcr.io
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
@@ -173,7 +173,7 @@ jobs:
|
||||
echo "SERVER_VERSION=${GITHUB_REF##*/v}" >> $GITHUB_ENV
|
||||
-
|
||||
name: Build and push (scratch)
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: .
|
||||
|
||||
2
.github/workflows/release.updates.yml
vendored
2
.github/workflows/release.updates.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
|
||||
19
.github/workflows/release.yml
vendored
19
.github/workflows/release.yml
vendored
@@ -10,7 +10,6 @@ jobs:
|
||||
name: create-release
|
||||
runs-on: ubuntu-22.04
|
||||
outputs:
|
||||
upload_url: ${{ steps.release.outputs.upload_url }}
|
||||
sws_version: ${{ env.SWS_VERSION }}
|
||||
steps:
|
||||
- name: Get the release version from the tag
|
||||
@@ -23,14 +22,10 @@ jobs:
|
||||
echo "SWS_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||
echo "version is: ${{ env.SWS_VERSION }}"
|
||||
- name: Create GitHub release
|
||||
id: release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.SWS_VERSION }}
|
||||
draft: true
|
||||
release_name: ${{ env.SWS_VERSION }}
|
||||
run: |
|
||||
gh release create ${{ env.SWS_VERSION }} --verify-tag --draft --title="${{ env.SWS_VERSION }}"
|
||||
|
||||
build-release:
|
||||
name: build-release
|
||||
@@ -160,7 +155,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
@@ -240,11 +235,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Upload release archive
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ needs.create-release.outputs.upload_url }}
|
||||
asset_path: ${{ env.ASSET }}
|
||||
asset_name: ${{ env.ASSET }}
|
||||
asset_content_type: application/octet-stream
|
||||
run: |
|
||||
gh release upload ${{ env.SWS_VERSION }} ${{ env.ASSET }}
|
||||
|
||||
Reference in New Issue
Block a user