ci: update build workflow actions

This commit is contained in:
Nicolas Giard 2023-02-04 12:29:25 -05:00 committed by GitHub
parent 30b66b1623
commit 30576149d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ jobs:
packages: write packages: write
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Set Build Variables - name: Set Build Variables
run: | run: |
@ -42,20 +42,20 @@ jobs:
cat package.json cat package.json
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v1 uses: docker/login-action@v2.1.0
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v1 uses: docker/login-action@v2.1.0
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images - name: Build and push Docker images
uses: docker/build-push-action@v2.9.0 uses: docker/build-push-action@v4.0.0
with: with:
context: . context: .
file: dev/build/Dockerfile file: dev/build/Dockerfile
@ -78,7 +78,7 @@ jobs:
find _dist/wiki/ -printf "%P\n" | tar -czf wiki-js.tar.gz --no-recursion -C _dist/wiki/ -T - find _dist/wiki/ -printf "%P\n" | tar -czf wiki-js.tar.gz --no-recursion -C _dist/wiki/ -T -
- name: Upload a Build Artifact - name: Upload a Build Artifact
uses: actions/upload-artifact@v2.3.1 uses: actions/upload-artifact@v3.1.2
with: with:
name: drop name: drop
path: wiki-js.tar.gz path: wiki-js.tar.gz
@ -93,7 +93,7 @@ jobs:
dbtype: [postgres, mysql, mariadb, mssql, sqlite] dbtype: [postgres, mysql, mariadb, mssql, sqlite]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Set Test Variables - name: Set Test Variables
run: | run: |
@ -130,7 +130,7 @@ jobs:
docker: armv7 docker: armv7
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Set Version Variables - name: Set Version Variables
run: | run: |
@ -143,19 +143,19 @@ jobs:
fi fi
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v1 uses: docker/setup-qemu-action@v2.1.0
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v2.4.0
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v1 uses: docker/login-action@v2.1.0
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v1 uses: docker/login-action@v2.1.0
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
@ -173,7 +173,7 @@ jobs:
tar -xzf $GITHUB_WORKSPACE/drop/wiki-js.tar.gz -C $GITHUB_WORKSPACE/build --exclude=node_modules tar -xzf $GITHUB_WORKSPACE/drop/wiki-js.tar.gz -C $GITHUB_WORKSPACE/build --exclude=node_modules
- name: Build and push Docker images - name: Build and push Docker images
uses: docker/build-push-action@v2.9.0 uses: docker/build-push-action@v4.0.0
with: with:
context: . context: .
file: dev/build-arm/Dockerfile file: dev/build-arm/Dockerfile
@ -191,12 +191,12 @@ jobs:
steps: steps:
- name: Setup Node.js environment - name: Setup Node.js environment
uses: actions/setup-node@v2.5.1 uses: actions/setup-node@v3.6.0
with: with:
node-version: 16.x node-version: 16.x
- name: Download a Build Artifact - name: Download a Build Artifact
uses: actions/download-artifact@v2.1.0 uses: actions/download-artifact@v3.0.2
with: with:
name: drop name: drop
path: drop path: drop
@ -214,7 +214,7 @@ jobs:
run: tar -czf wiki-js-windows.tar.gz -C $env:GITHUB_WORKSPACE\win . run: tar -czf wiki-js-windows.tar.gz -C $env:GITHUB_WORKSPACE\win .
- name: Upload a Build Artifact - name: Upload a Build Artifact
uses: actions/upload-artifact@v2.3.1 uses: actions/upload-artifact@v3.1.2
with: with:
name: drop-win name: drop-win
path: wiki-js-windows.tar.gz path: wiki-js-windows.tar.gz
@ -234,13 +234,13 @@ jobs:
echo "REL_VERSION_STRICT=${GITHUB_REF_NAME#?}" >> $GITHUB_ENV echo "REL_VERSION_STRICT=${GITHUB_REF_NAME#?}" >> $GITHUB_ENV
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v1 uses: docker/login-action@v2.1.0
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v1 uses: docker/login-action@v2.1.0
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
@ -275,13 +275,13 @@ jobs:
echo "REL_VERSION_STRICT=${GITHUB_REF_NAME#?}" >> $GITHUB_ENV echo "REL_VERSION_STRICT=${GITHUB_REF_NAME#?}" >> $GITHUB_ENV
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v1 uses: docker/login-action@v2.1.0
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v1 uses: docker/login-action@v2.1.0
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
@ -321,13 +321,13 @@ jobs:
docker manifest push -p ghcr.io/requarks/wiki:latest docker manifest push -p ghcr.io/requarks/wiki:latest
- name: Download Linux Build - name: Download Linux Build
uses: actions/download-artifact@v2.1.0 uses: actions/download-artifact@v3.0.2
with: with:
name: drop name: drop
path: drop path: drop
- name: Download Windows Build - name: Download Windows Build
uses: actions/download-artifact@v2.1.0 uses: actions/download-artifact@v3.0.2
with: with:
name: drop-win name: drop-win
path: drop-win path: drop-win
@ -384,7 +384,7 @@ jobs:
needs: [release] needs: [release]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Set Version Variables - name: Set Version Variables
run: | run: |