Time Zones Are Hard - https://tz.rita.moe
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use same build script than atw-watcher

[skip ci]

+44 -13
+44 -13
.forgejo/workflows/build.yml
··· 5 5 branches: 6 6 - main 7 7 8 + pull_request: 9 + branches: [ "**" ] 10 + 11 + env: 12 + SHA: ${{ github.event.pull_request.head.sha || github.event.after }} 13 + COMPARE_TAG: latest 14 + 8 15 jobs: 9 16 build: 10 17 if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} ··· 12 19 name: Build 13 20 container: 14 21 image: catthehacker/ubuntu:act-latest 15 - env: 16 - DOCKER_TAG: latest 17 22 steps: 18 23 - name: Checkout 19 24 uses: actions/checkout@v3 20 25 21 26 - name: Get Meta 22 - id: meta 27 + id: repometa 23 28 run: | 24 29 echo REGISTRY_DOMAIN=$(echo ${GITHUB_SERVER_URL} | sed 's\^https://\\') >> $GITHUB_OUTPUT 25 - echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT 26 30 27 31 - name: Set up QEMU 28 - uses: docker/setup-qemu-action@v2 32 + uses: https://github.com/docker/setup-qemu-action@v2 29 33 30 34 - name: Set up Docker BuildX 31 - uses: docker/setup-buildx-action@v2 35 + uses: https://github.com/docker/setup-buildx-action@v2 32 36 33 37 - name: Login to registry 34 - uses: docker/login-action@v2 38 + uses: https://github.com/docker/login-action@v2 35 39 with: 36 - registry: ${{ steps.meta.outputs.REGISTRY_DOMAIN }} 40 + registry: ${{ steps.repometa.outputs.REGISTRY_DOMAIN }} 37 41 username: ${{ github.repository_owner }} 38 42 password: ${{ secrets.CI_REGISTRY_TOKEN }} 39 43 44 + - name: Docker metadata 45 + id: meta 46 + uses: https://github.com/docker/metadata-action@v4 47 + with: 48 + images: ${{ steps.repometa.outputs.REGISTRY_DOMAIN }}/${{ github.repository }} 49 + labels: | 50 + org.opencontainers.image.revision=${{ env.SHA }} 51 + tags: | 52 + type=edge,branch=$repo.default_branch 53 + type=sha,prefix=,suffix=,format=short 54 + type=raw,value=latest,enable={{is_default_branch}} 55 + 40 56 - name: Build and push 41 - uses: docker/build-push-action@v4 57 + uses: https://github.com/docker/build-push-action@v4 42 58 env: 43 59 ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119 44 60 with: ··· 47 63 platforms: | 48 64 linux/amd64 49 65 linux/arm64 50 - push: true 51 - tags: | 52 - ${{ steps.meta.outputs.REGISTRY_DOMAIN }}/${{ github.repository }}:${{ steps.meta.outputs.REPO_VERSION }} 53 - ${{ steps.meta.outputs.REGISTRY_DOMAIN }}/${{ github.repository }}:${{ env.DOCKER_TAG }} 66 + push: ${{ github.event_name != 'pull_request' }} 67 + tags: ${{ steps.meta.outputs.tags }} 68 + labels: ${{ steps.meta.outputs.labels }} 69 + cache-from: type=gha 70 + cache-to: type=gha,mode=max 71 + 72 + # - name: Docker Scout 73 + # id: docker-scout 74 + # if: ${{ github.event_name == 'pull_request' }} 75 + # uses: https://github.com/docker/scout-action@v0.23.4 76 + # with: 77 + # dockerhub-user: ${{ secrets.DOCKERHUB_USER }} 78 + # dockerhub-password: ${{ secrets.DOCKERHUB_PASSWORD }} 79 + # command: compare 80 + # # image: ${{ steps.meta.outputs.tags }} 81 + # to: ${{ steps.repometa.outputs.REGISTRY_DOMAIN }}/${{ github.repository }}:${{ env.COMPARE_TAG }} 82 + # ignore-unchanged: true 83 + # write-comment: true 84 + # github-token: ${{ secrets.GITHUB_TOKEN }} # to be able to write the comment