diff options
author | techknowlogick <techknowlogick@gitea.io> | 2023-06-18 01:04:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-18 01:04:23 -0400 |
commit | fc2115b494e9ba7e4cf7a1440404dce53738b514 (patch) | |
tree | d3b3c81d09e6ae0215b15b453669793bd38e9e00 /.github/workflows/release-nightly.yml | |
parent | 61e0827f42cc90044944c5c0342527a2f0c2bf7d (diff) | |
download | gitea-fc2115b494e9ba7e4cf7a1440404dce53738b514.tar.gz gitea-fc2115b494e9ba7e4cf7a1440404dce53738b514.zip |
build nightly docker images (#25317)
followup of https://github.com/go-gitea/gitea/pull/25308 this time to
build & push nightly docker images
Diffstat (limited to '.github/workflows/release-nightly.yml')
-rw-r--r-- | .github/workflows/release-nightly.yml | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml index 4281c2ca09..71ec6dae84 100644 --- a/.github/workflows/release-nightly.yml +++ b/.github/workflows/release-nightly.yml @@ -55,5 +55,33 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: docker/setup-buildx-action@v1 - # build for linux/amd64, and linux/arm64 (possibly include linux/arm/v7 later. not included now because it adds significant amount to the build time) + - uses: docker/setup-qemu-action@v2 + - uses: docker/setup-buildx-action@v2 + - name: Get cleaned branch name + id: clean_name + run: | + # if main then say nightly otherwise cleanup name + if [ "${{ github.ref }}" = "refs/heads/main" ]; then + echo "branch=nightly" >> "$GITHUB_OUTPUT" + exit 0 + fi + REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//') + echo "branch=${REF_NAME}-nightly" >> "$GITHUB_OUTPUT" + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: build rootful docker image + uses: docker/build-push-action@v4 + with: + platforms: linux/amd64,linux/arm64 + push: true + tags: gitea/gitea:${{ steps.clean_name.outputs.branch }} + - name: build rootless docker image + uses: docker/build-push-action@v4 + with: + platforms: linux/amd64,linux/arm64 + push: true + file: Dockerfile.rootless + tags: gitea/gitea:${{ steps.clean_name.outputs.branch }}-rootless |