From 23bc11f31556d5fc09b5fb8f149b149c2310bbef Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Sat, 13 Mar 2021 11:40:20 -0500 Subject: [PATCH] fix workflow --- .github/CODEOWNERS | 2 ++ .github/workflows/ci.yml | 9 ++++++--- .github/workflows/release.yml | 11 +++++++---- build/package/Dockerfile => Dockerfile | 0 4 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 .github/CODEOWNERS rename build/package/Dockerfile => Dockerfile (100%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..9c85867 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners +* @onedr0p diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1eff507..d8ba8f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,9 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Prepare + run: echo ::set-output name=version::${GITHUB_REF##*/} + - name: Set up QEMU uses: docker/setup-qemu-action@v1 with: @@ -46,7 +49,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . - file: ./build/package/Dockerfile + file: ./Dockerfile platforms: linux/amd64,linux/arm/v7,linux/arm64 push: false # GitHub secrets not available in PRs tags: | @@ -57,8 +60,8 @@ jobs: uses: docker/build-push-action@v2 with: context: . - file: ./build/package/Dockerfile + file: ./Dockerfile platforms: linux/amd64,linux/arm/v7,linux/arm64 push: true tags: | - ${{ env.REGISTRY_IMAGE }}:${GITHUB_REF##*/} + ${{ env.REGISTRY_IMAGE }}:${{ steps.prep.outputs.version }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3a1d514..b60b3f4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: release +name: ci on: push: @@ -16,6 +16,9 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Prepare + run: echo ::set-output name=version::${GITHUB_REF##*/} + - name: Set up QEMU uses: docker/setup-qemu-action@v1 with: @@ -37,14 +40,14 @@ jobs: username: ${{ secrets.GHCR_USERNAME }} password: ${{ secrets.GHCR_TOKEN }} - - name: Build and Push + - name: Build and Push (release) if: github.event_name != 'pull_request' uses: docker/build-push-action@v2 with: context: . - file: ./build/package/Dockerfile + file: ./Dockerfile platforms: linux/amd64,linux/arm/v7,linux/arm64 push: true tags: | ${{ env.REGISTRY_IMAGE }}:latest - ${{ env.REGISTRY_IMAGE }}:${GITHUB_REF##*/} + ${{ env.REGISTRY_IMAGE }}:${{ steps.prep.outputs.version }} diff --git a/build/package/Dockerfile b/Dockerfile similarity index 100% rename from build/package/Dockerfile rename to Dockerfile