Skip to content

Commit

Permalink
update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
queeup committed Apr 7, 2024
1 parent 3b302da commit 9aac632
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/container_build_and_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,45 +15,51 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Get repository basename
id: repo-basename
run: |
echo "value=`basename ${{ github.repository }}`" >> $GITHUB_OUTPUT
shell: bash

- name: Check out the repo
uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

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

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
${{ github.repository }}
${{ secrets.DOCKER_HUB_USERNAME }}/${{ steps.repo-basename.outputs.value }}
ghcr.io/${{ github.repository }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64,linux/arm/8,linux/arm/7,linux/arm/6

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64,linux/arm/8,linux/arm/7,linux/arm/6
context: .
Expand Down

0 comments on commit 9aac632

Please sign in to comment.