Skip to content

Commit

Permalink
Update Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dotneft committed Feb 5, 2024
1 parent 9153143 commit 5713a77
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 58 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dockerhub_description.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
50 changes: 24 additions & 26 deletions .github/workflows/images_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ on:
- published
push:
branches:
- '4.0'
- '5.0'
- '6.0'
- '6.2'
- '6.4'
- 'trunk'
paths:
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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 }}
Expand All @@ -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: |
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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: |
Expand All @@ -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 }}

Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand Down Expand Up @@ -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: |
Expand All @@ -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 }}
Expand All @@ -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
Expand Down
29 changes: 9 additions & 20 deletions .github/workflows/images_build_rhel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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: |
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/images_build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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: |
Expand Down Expand Up @@ -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 }}
Expand All @@ -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: |
Expand All @@ -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: |
Expand All @@ -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 }}

Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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: |
Expand All @@ -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 }}

Expand Down

0 comments on commit 5713a77

Please sign in to comment.