Update Github actions

This commit is contained in:
Alexey Pustovalov 2024-02-05 13:16:42 +09:00
parent 915314340f
commit 5713a77f31
4 changed files with 45 additions and 58 deletions

View File

@ -37,10 +37,10 @@ jobs:
- web-service
steps:
-
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Update DockerHub repo description
uses: peter-evans/dockerhub-description@v3
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

View File

@ -6,10 +6,8 @@ on:
- published
push:
branches:
- '4.0'
- '5.0'
- '6.0'
- '6.2'
- '6.4'
- 'trunk'
paths:
@ -40,7 +38,7 @@ jobs:
is_default_branch: ${{ steps.branch_info.outputs.is_default_branch }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
@ -109,23 +107,23 @@ jobs:
runs-on: ubuntu-latest
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
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
driver-opts: image=moby/buildkit:master
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
@ -140,7 +138,7 @@ jobs:
- name: Generate tags
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_REPOSITORY }}/zabbix-${{ env.BASE_BUILD_NAME }}
tags: |
@ -151,7 +149,7 @@ jobs:
- name: Build ${{ env.BASE_BUILD_NAME }}/${{ matrix.os }} and push
id: docker_build
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: ./Dockerfiles/${{ env.BASE_BUILD_NAME }}/${{ matrix.os }}
file: ./Dockerfiles/${{ env.BASE_BUILD_NAME }}/${{ matrix.os }}/Dockerfile
@ -168,7 +166,7 @@ jobs:
echo "${{ steps.docker_build.outputs.digest }}" > ${{ env.BASE_BUILD_NAME }}_${{ matrix.os }}
- name: Upload SHA256 tag
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.BASE_BUILD_NAME }}_${{ matrix.os }}
path: ${{ env.BASE_BUILD_NAME }}_${{ matrix.os }}
@ -184,24 +182,24 @@ jobs:
build: ${{ fromJson(needs.init_build.outputs.database) }}
os: ${{ fromJson(needs.init_build.outputs.os) }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
driver-opts: image=moby/buildkit:master
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
@ -216,7 +214,7 @@ jobs:
- name: Generate tags
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_REPOSITORY }}/zabbix-${{ matrix.build }}
tags: |
@ -226,7 +224,7 @@ jobs:
latest=false
- name: Download SHA256 tag build-base:${{ matrix.os }}
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-base_${{ matrix.os }}
@ -241,7 +239,7 @@ jobs:
- name: Build ${{ matrix.build }}/${{ matrix.os }} and push
id: docker_build
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: ./Dockerfiles/${{ matrix.build }}/${{ matrix.os }}
file: ./Dockerfiles/${{ matrix.build }}/${{ matrix.os }}/Dockerfile
@ -259,7 +257,7 @@ jobs:
echo "${{ steps.docker_build.outputs.digest }}" > ${{ matrix.build }}_${{ matrix.os }}
- name: Upload SHA256 tag
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.build }}_${{ matrix.os }}
path: ${{ matrix.build }}_${{ matrix.os }}
@ -277,21 +275,21 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
driver-opts: image=moby/buildkit:master
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
@ -332,7 +330,7 @@ jobs:
- name: Generate tags
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_REPOSITORY }}/zabbix-${{ matrix.build }}
tags: |
@ -342,7 +340,7 @@ jobs:
latest=false
- name: Download SHA256 tag for ${{ steps.build_base_image.outputs.build_base }}:${{ matrix.os }}
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
if: ${{ matrix.build != 'snmptraps' }}
with:
name: ${{ steps.build_base_image.outputs.build_base }}_${{ matrix.os }}
@ -359,7 +357,7 @@ jobs:
- name: Build ${{ matrix.build }}/${{ matrix.os }} and push
id: docker_build
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: ./Dockerfiles/${{ matrix.build }}/${{ matrix.os }}
file: ./Dockerfiles/${{ matrix.build }}/${{ matrix.os }}/Dockerfile

View File

@ -4,17 +4,6 @@ on:
release:
types:
- published
push:
branches:
- '5.0'
- '6.0'
- '6.2'
- '6.4'
- 'trunk'
paths:
- '!**/README.md'
- 'Dockerfiles/*/rhel/*'
- '.github/workflows/images_build_rhel.yml'
defaults:
run:
@ -40,7 +29,7 @@ jobs:
sha_short: ${{ steps.branch_info.outputs.sha_short }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
@ -84,13 +73,13 @@ jobs:
image: ${{ steps.build_image.outputs.image-with-tag }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Generate tags
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: zabbix-${{ matrix.build }}
tags: |
@ -120,13 +109,13 @@ jobs:
runs-on: [self-hosted, linux, X64]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Generate tags
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: zabbix-build-${{ matrix.build }}
tags: |
@ -154,7 +143,7 @@ jobs:
runs-on: [self-hosted, linux, X64]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Detect Build Base Image
id: build_base_image
@ -165,7 +154,7 @@ jobs:
echo "build_base=$BUILD_BASE" >> $GITHUB_OUTPUT
- name: Genarate image name
- name: Generate image name
id: image_name
env:
REDHAT_CERTIFY_CREDENTIALS: ${{ secrets.REDHAT_CERTIFY_CREDENTIALS }}
@ -191,7 +180,7 @@ jobs:
echo "password=$REGISTRY_PASSWORD" >> $GITHUB_OUTPUT
- name: Log in to Quay.io
uses: redhat-actions/podman-login@v1.5
uses: redhat-actions/podman-login@v1.6
env:
LOGIN: ${{ steps.login_credentials.outputs.username }}
PASSWORD: ${{ steps.login_credentials.outputs.password }}
@ -208,7 +197,7 @@ jobs:
- name: Generate tags
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.REGISTRY_NAMESPACE }}/${{ steps.image_name.outputs.image_name }}
tags: |

View File

@ -37,7 +37,7 @@ jobs:
is_default_branch: ${{ steps.branch_info.outputs.is_default_branch }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 1
@ -99,7 +99,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 1
@ -116,7 +116,7 @@ jobs:
- name: Generate tags
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGE_PREFIX }}${{ env.BASE_BUILD_NAME }}
tags: |
@ -169,7 +169,7 @@ jobs:
- name: Upload SHA256 tag
if: ${{ env.AUTO_PUSH_IMAGES }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.BASE_BUILD_NAME }}${{ env.BASE_BUILD_ARTIFACT_FILE_SUFFIX }}
path: ${{ env.BASE_BUILD_NAME }}${{ env.BASE_BUILD_ARTIFACT_FILE_SUFFIX }}
@ -196,7 +196,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Login to DockerHub
run: |
@ -211,7 +211,7 @@ jobs:
- name: Generate tags
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGE_PREFIX }}${{ env.COMPONENT_BASE_BUILD_NAME }}
tags: |
@ -221,7 +221,7 @@ jobs:
latest=false
- name: Download SHA256 tag build-base:${{ matrix.os }}
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.BASE_BUILD_NAME }}${{ env.BASE_BUILD_ARTIFACT_FILE_SUFFIX }}
@ -278,7 +278,7 @@ jobs:
- name: Upload SHA256 tag
if: ${{ env.AUTO_PUSH_IMAGES }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.COMPONENT_BASE_BUILD_NAME }}${{ env.COMPONENT_BASE_BUILD_ARTIFACT_FILE_SUFFIX }}
path: ${{ env.COMPONENT_BASE_BUILD_NAME }}${{ env.COMPONENT_BASE_BUILD_ARTIFACT_FILE_SUFFIX }}
@ -318,7 +318,7 @@ jobs:
- name: Generate tags
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGE_PREFIX }}${{ matrix.component }}
tags: |
@ -328,7 +328,7 @@ jobs:
latest=false
- name: Download SHA256 tag for ${{ env.COMPONENT_BASE_BUILD_NAME }}:${{ matrix.os }}
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.COMPONENT_BASE_BUILD_NAME }}${{ env.COMPONENT_BASE_BUILD_ARTIFACT_FILE_SUFFIX }}