Skip to content

Commit

Permalink
update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tob1as committed Jan 19, 2025
1 parent 6742534 commit 2e0c278
Show file tree
Hide file tree
Showing 12 changed files with 87 additions and 162 deletions.
45 changes: 17 additions & 28 deletions .github/workflows/build_docker_images-azcopy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Shell-Script
id: script
Expand All @@ -34,56 +34,54 @@ jobs:
GITHUB_REPO_SHORT=${GITHUB_REPO_SHORT#"docker-"}
DOCKER_REPO=${{ secrets.DOCKER_USERNAME }}/${GITHUB_REPO_SHORT}
REDHAT_QUAY_REPO=${{ secrets.REDHAT_QUAY_USERNAME }}/${GITHUB_REPO_SHORT}
# AzCopy
AZCOPY_VERSION=$(curl -s https://api.github.com/repos/Azure/azure-storage-azcopy/releases/latest | grep 'tag_name' | cut -d\" -f4)
echo "AZCOPY_VERSION=${AZCOPY_VERSION}"
# Set output parameters to github action.
echo ::set-output name=build_date::${BUILD_DATE}
echo ::set-output name=build_date_numeric::${BUILD_DATE_NUMERIC}
echo ::set-output name=commit_hash::${COMMIT_HASH}
echo ::set-output name=github_repo::${GITHUB_REPO}
echo ::set-output name=docker_repo::${DOCKER_REPO}
echo ::set-output name=redhat_quay_repo::${REDHAT_QUAY_REPO}
# Set output parameters to action.
echo "build_date=${BUILD_DATE}" >> "$GITHUB_OUTPUT"
echo "build_date_numeric=${BUILD_DATE_NUMERIC}" >> "$GITHUB_OUTPUT"
echo "commit_hash=${COMMIT_HASH}" >> "$GITHUB_OUTPUT"
echo "github_repo=${GITHUB_REPO}" >> "$GITHUB_OUTPUT"
echo "docker_repo=${DOCKER_REPO}" >> "$GITHUB_OUTPUT"
echo "redhat_quay_repo=${REDHAT_QUAY_REPO}" >> "$GITHUB_OUTPUT"
# AzCopy
echo ::set-output name=azcopy_version::${AZCOPY_VERSION}
AZCOPY_VERSION=$(curl -s https://api.github.com/repos/Azure/azure-storage-azcopy/releases/latest | grep 'tag_name' | cut -d\" -f4)
echo "AZCOPY_VERSION=${AZCOPY_VERSION}"
echo "azcopy_version=${AZCOPY_VERSION}" >> "$GITHUB_OUTPUT"
- name: Set up QEMU
id: 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
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

#- name: Login to GitHub Container Registry
# uses: docker/login-action@v2
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

#- name: Login to RED HAT Quay.io Container Registry
# uses: docker/login-action@v2
# uses: docker/login-action@v3
# with:
# registry: quay.io
# username: ${{ secrets.REDHAT_QUAY_USERNAME }}
# password: ${{ secrets.REDHAT_QUAY_PASSWORD }}

- name: Build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
Expand All @@ -101,12 +99,3 @@ jobs:
# ghcr.io/${{steps.script.outputs.github_repo}}:azcopy-${{steps.script.outputs.azcopy_version}}
# ghcr.io/${{steps.script.outputs.github_repo}}:azcopy-${{steps.script.outputs.build_date_numeric}}.${{steps.script.outputs.commit_hash}}
# quay.io/${{steps.script.outputs.redhat_quay_repo}}:azcopy

#- name: Docker Hub Description
# uses: peter-evans/dockerhub-description@v3
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# repository: ${{steps.script.outputs.docker_repo}}
# short-description: ${{ github.event.repository.description }}
# readme-filepath: README.md
9 changes: 0 additions & 9 deletions .github/workflows/build_docker_images-c-mqtt-forwarder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,3 @@ jobs:
docker.io/${{steps.script.outputs.docker_repo}}:c-mqtt-forwarder-${{steps.script.outputs.c_mqtt_forwarder_version}}
quay.io/${{steps.script.outputs.redhat_quay_repo}}:c-mqtt-forwarder
ghcr.io/${{steps.script.outputs.github_repo}}:c-mqtt-forwarder
#- name: Docker Hub Description
# uses: peter-evans/dockerhub-description@v4
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# repository: ${{steps.script.outputs.docker_repo}}
# short-description: ${{ github.event.repository.description }}
# readme-filepath: README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,3 @@ jobs:
docker.io/${{steps.script.outputs.docker_repo}}:c-mqtt-forwarder-${{steps.script.outputs.c_mqtt_forwarder_version}}-distroless
quay.io/${{steps.script.outputs.redhat_quay_repo}}:c-mqtt-forwarder-distroless
ghcr.io/${{steps.script.outputs.github_repo}}:c-mqtt-forwarder-distroless
#- name: Docker Hub Description
# uses: peter-evans/dockerhub-description@v4
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# repository: ${{steps.script.outputs.docker_repo}}
# short-description: ${{ github.event.repository.description }}
# readme-filepath: README.md
13 changes: 2 additions & 11 deletions .github/workflows/build_docker_images-keepalived.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login to RED HAT Quay.io Container Registry
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.REDHAT_QUAY_USERNAME }}
password: ${{ secrets.REDHAT_QUAY_PASSWORD }}

- name: Build
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
Expand All @@ -133,12 +133,3 @@ jobs:
docker.io/${{steps.script.outputs.docker_repo}}:keepalived
docker.io/${{steps.script.outputs.docker_repo}}:keepalived-${{steps.script.outputs.keepalived_version}}
quay.io/${{steps.script.outputs.redhat_quay_repo}}:keepalived
#- name: Docker Hub Description
# uses: peter-evans/dockerhub-description@v3
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# repository: ${{steps.script.outputs.docker_repo}}
# short-description: ${{ github.event.repository.description }}
# readme-filepath: README.md
34 changes: 16 additions & 18 deletions .github/workflows/build_docker_images-kiwiirc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Shell-Script
id: script
Expand All @@ -35,55 +35,53 @@ jobs:
DOCKER_REPO=${{ secrets.DOCKER_USERNAME }}/${GITHUB_REPO_SHORT}
REDHAT_QUAY_REPO=${{ secrets.REDHAT_QUAY_USERNAME }}/${GITHUB_REPO_SHORT}
# Set output parameters to action.
echo "build_date=${BUILD_DATE}" >> "$GITHUB_OUTPUT"
echo "build_date_numeric=${BUILD_DATE_NUMERIC}" >> "$GITHUB_OUTPUT"
echo "commit_hash=${COMMIT_HASH}" >> "$GITHUB_OUTPUT"
echo "github_repo=${GITHUB_REPO}" >> "$GITHUB_OUTPUT"
echo "docker_repo=${DOCKER_REPO}" >> "$GITHUB_OUTPUT"
echo "redhat_quay_repo=${REDHAT_QUAY_REPO}" >> "$GITHUB_OUTPUT"
# KiwiIRC
VERSION=$(wget -qO- https://api.github.com/repos/kiwiirc/kiwiirc/releases/latest | grep 'tag_name' | cut -d\" -f4)
echo "VERSION=${VERSION}"
# Set output parameters to github action.
echo ::set-output name=build_date::${BUILD_DATE}
echo ::set-output name=build_date_numeric::${BUILD_DATE_NUMERIC}
echo ::set-output name=commit_hash::${COMMIT_HASH}
echo ::set-output name=github_repo::${GITHUB_REPO}
echo ::set-output name=docker_repo::${DOCKER_REPO}
echo ::set-output name=redhat_quay_repo::${REDHAT_QUAY_REPO}
# KiwiIRC
echo ::set-output name=version::${VERSION}
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
- name: Set up QEMU
id: 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
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login to RED HAT Quay.io Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.REDHAT_QUAY_USERNAME }}
password: ${{ secrets.REDHAT_QUAY_PASSWORD }}

- name: Build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
Expand Down
34 changes: 16 additions & 18 deletions .github/workflows/build_docker_images-mqtt-board.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Shell-Script
id: script
Expand All @@ -34,56 +34,54 @@ jobs:
GITHUB_REPO_SHORT=${GITHUB_REPO_SHORT#"docker-"}
DOCKER_REPO=${{ secrets.DOCKER_USERNAME }}/${GITHUB_REPO_SHORT}
REDHAT_QUAY_REPO=${{ secrets.REDHAT_QUAY_USERNAME }}/${GITHUB_REPO_SHORT}
# Set output parameters to action.
echo "build_date=${BUILD_DATE}" >> "$GITHUB_OUTPUT"
echo "build_date_numeric=${BUILD_DATE_NUMERIC}" >> "$GITHUB_OUTPUT"
echo "commit_hash=${COMMIT_HASH}" >> "$GITHUB_OUTPUT"
echo "github_repo=${GITHUB_REPO}" >> "$GITHUB_OUTPUT"
echo "docker_repo=${DOCKER_REPO}" >> "$GITHUB_OUTPUT"
echo "redhat_quay_repo=${REDHAT_QUAY_REPO}" >> "$GITHUB_OUTPUT"
# mqtt-board
VERSION=$(wget -qO- https://api.github.com/repos/flespi-software/MQTT-Board/tags | grep 'name' | cut -d\" -f4 | head -1)
echo "VERSION=${VERSION}"
# Set output parameters to github action.
echo ::set-output name=build_date::${BUILD_DATE}
echo ::set-output name=build_date_numeric::${BUILD_DATE_NUMERIC}
echo ::set-output name=commit_hash::${COMMIT_HASH}
echo ::set-output name=github_repo::${GITHUB_REPO}
echo ::set-output name=docker_repo::${DOCKER_REPO}
echo ::set-output name=redhat_quay_repo::${REDHAT_QUAY_REPO}
# mqtt-board
echo ::set-output name=version::${VERSION}
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
- name: Set up QEMU
id: 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
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login to RED HAT Quay.io Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.REDHAT_QUAY_USERNAME }}
password: ${{ secrets.REDHAT_QUAY_PASSWORD }}

- name: Build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/build_docker_images-mqtt-forwarder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,3 @@ jobs:
docker.io/${{steps.script.outputs.docker_repo}}:mqtt-forwarder-${{steps.script.outputs.mqtt_forwarder_version}}
quay.io/${{steps.script.outputs.redhat_quay_repo}}:mqtt-forwarder
ghcr.io/${{steps.script.outputs.github_repo}}:mqtt-forwarder
#- name: Docker Hub Description
# uses: peter-evans/dockerhub-description@v4
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# repository: ${{steps.script.outputs.docker_repo}}
# short-description: ${{ github.event.repository.description }}
# readme-filepath: README.md
Loading

0 comments on commit 2e0c278

Please sign in to comment.