diff --git a/.github/workflows/dockerhub-build.yml b/.github/workflows/binary-assets.yml similarity index 81% rename from .github/workflows/dockerhub-build.yml rename to .github/workflows/binary-assets.yml index 9876317..84e88be 100644 --- a/.github/workflows/dockerhub-build.yml +++ b/.github/workflows/binary-assets.yml @@ -1,4 +1,4 @@ -name: Build and Push Image for Docker Hub +name: Binary release on: release: types: [published] @@ -28,25 +28,6 @@ jobs: - name: Available platforms run: echo ${{ steps.buildx.outputs.platforms }} - - name: Login to DockerHub - run: echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin - - - name: Build and push tag - run: | - docker buildx build \ - --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 \ - -t a00s/${{ steps.variables.outputs.REPOSITORY_NAME }}:${{ steps.variables.outputs.SOURCE_TAG }} \ - . \ - --push - - - name: Build and push latest - run: | - docker buildx build \ - --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 \ - -t a00s/${{ steps.variables.outputs.REPOSITORY_NAME }}:latest \ - . \ - --push - - name: Build and upload binaries to release run: | mkdir build diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml new file mode 100644 index 0000000..647e053 --- /dev/null +++ b/.github/workflows/build-image.yml @@ -0,0 +1,48 @@ +name: Docker image +on: + release: + types: [published] +jobs: + buildx: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Variables + id: variables + run: | + echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/} + echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/} + echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/} + echo ::set-output name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}') + + - name: Set up Docker Buildx + id: buildx + uses: crazy-max/ghaction-docker-buildx@v2 + with: + buildx-version: latest + skip-cache: false + qemu-version: latest + + - name: Available platforms + run: echo ${{ steps.buildx.outputs.platforms }} + + - name: Login to DockerHub + run: echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin + + - name: Build and push tag + run: | + docker buildx build \ + --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 \ + -t a00s/${{ steps.variables.outputs.REPOSITORY_NAME }}:${{ steps.variables.outputs.SOURCE_TAG }} \ + . \ + --push + + - name: Build and push latest + run: | + docker buildx build \ + --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 \ + -t a00s/${{ steps.variables.outputs.REPOSITORY_NAME }}:latest \ + . \ + --push diff --git a/.github/workflows/dockerhub-description.yml b/.github/workflows/update-description.yml similarity index 94% rename from .github/workflows/dockerhub-description.yml rename to .github/workflows/update-description.yml index fe887ba..35c0e48 100644 --- a/.github/workflows/dockerhub-description.yml +++ b/.github/workflows/update-description.yml @@ -5,7 +5,7 @@ on: - master paths: - README.md - - .github/workflows/dockerhub-description.yml + - .github/workflows/update-description.yml jobs: dockerHubDescription: runs-on: ubuntu-latest