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 - web-service
steps: steps:
- -
uses: actions/checkout@v3 uses: actions/checkout@v4
- -
name: Update DockerHub repo description name: Update DockerHub repo description
uses: peter-evans/dockerhub-description@v3 uses: peter-evans/dockerhub-description@v4
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}

View File

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

View File

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

View File

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