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

Update .forgejo/workflows/build.yml

Kody 331bd3aa 645829e7

Changed files
+84 -84
.forgejo
workflows
+84 -84
.forgejo/workflows/build.yml
···
-
name: Build
-
-
on:
-
push:
-
branches:
-
- main
-
-
pull_request:
-
branches: [ "**" ]
-
-
env:
-
SHA: ${{ github.event.pull_request.head.sha || github.event.after }}
-
COMPARE_TAG: latest
-
-
jobs:
-
build:
-
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
-
runs-on: ubuntu-latest
-
name: Build
-
container:
-
image: catthehacker/ubuntu:act-latest
-
steps:
-
- name: Checkout
-
uses: actions/checkout@v3
-
-
- name: Get Meta
-
id: repometa
-
run: |
-
echo REGISTRY_DOMAIN=$(echo ${GITHUB_SERVER_URL} | sed 's\^https://\\') >> $GITHUB_OUTPUT
-
-
- name: Set up QEMU
-
uses: https://github.com/docker/setup-qemu-action@v2
-
-
- name: Set up Docker BuildX
-
uses: https://github.com/docker/setup-buildx-action@v2
-
-
- name: Login to registry
-
uses: https://github.com/docker/login-action@v2
-
with:
-
registry: ${{ steps.repometa.outputs.REGISTRY_DOMAIN }}
-
username: ${{ github.repository_owner }}
-
password: ${{ secrets.CI_REGISTRY_TOKEN }}
-
-
- name: Docker metadata
-
id: meta
-
uses: https://github.com/docker/metadata-action@v4
-
with:
-
images: ${{ steps.repometa.outputs.REGISTRY_DOMAIN }}/${{ github.repository }}
-
labels: |
-
org.opencontainers.image.revision=${{ env.SHA }}
-
tags: |
-
type=edge,branch=$repo.default_branch
-
type=sha,prefix=,suffix=,format=short
-
type=raw,value=latest,enable={{is_default_branch}}
-
-
- name: Build and push
-
uses: https://github.com/docker/build-push-action@v4
-
env:
-
ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119
-
with:
-
context: .
-
file: ./Dockerfile
-
platforms: |
-
linux/amd64
-
linux/arm64
-
push: ${{ github.event_name != 'pull_request' }}
-
tags: ${{ steps.meta.outputs.tags }}
-
labels: ${{ steps.meta.outputs.labels }}
-
cache-from: type=gha
-
cache-to: type=gha,mode=max
-
-
# - name: Docker Scout
-
# id: docker-scout
-
# if: ${{ github.event_name == 'pull_request' }}
-
# uses: https://github.com/docker/scout-action@v0.23.4
-
# with:
-
# dockerhub-user: ${{ secrets.DOCKERHUB_USER }}
-
# dockerhub-password: ${{ secrets.DOCKERHUB_PASSWORD }}
-
# command: compare
-
# # image: ${{ steps.meta.outputs.tags }}
-
# to: ${{ steps.repometa.outputs.REGISTRY_DOMAIN }}/${{ github.repository }}:${{ env.COMPARE_TAG }}
-
# ignore-unchanged: true
-
# write-comment: true
-
# github-token: ${{ secrets.GITHUB_TOKEN }} # to be able to write the comment
+
name: Build
+
+
on:
+
push:
+
branches:
+
- main
+
+
pull_request:
+
branches: [ "**" ]
+
+
env:
+
SHA: ${{ github.event.pull_request.head.sha || github.event.after }}
+
COMPARE_TAG: latest
+
+
jobs:
+
build:
+
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
+
runs-on: ubuntu-latest
+
name: Build
+
container:
+
image: catthehacker/ubuntu:act-latest
+
steps:
+
- name: Checkout
+
uses: actions/checkout@v4
+
+
- name: Get Meta
+
id: repometa
+
run: |
+
echo REGISTRY_DOMAIN=$(echo ${GITHUB_SERVER_URL} | sed 's\^https://\\') >> $GITHUB_OUTPUT
+
+
- name: Set up QEMU
+
uses: docker/setup-qemu-action@v2
+
+
- name: Set up Docker BuildX
+
uses: docker/setup-buildx-action@v2
+
+
- name: Login to registry
+
uses: docker/login-action@v2
+
with:
+
registry: ${{ steps.repometa.outputs.REGISTRY_DOMAIN }}
+
username: ${{ github.repository_owner }}
+
password: ${{ secrets.CI_REGISTRY_TOKEN }}
+
+
- name: Docker metadata
+
id: meta
+
uses: docker/metadata-action@v4
+
with:
+
images: ${{ steps.repometa.outputs.REGISTRY_DOMAIN }}/${{ github.repository }}
+
labels: |
+
org.opencontainers.image.revision=${{ env.SHA }}
+
tags: |
+
type=edge,branch=$repo.default_branch
+
type=sha,prefix=,suffix=,format=short
+
type=raw,value=latest,enable={{is_default_branch}}
+
+
- name: Build and push
+
uses: docker/build-push-action@v4
+
env:
+
ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119
+
with:
+
context: .
+
file: ./Dockerfile
+
platforms: |
+
linux/amd64
+
linux/arm64
+
push: ${{ github.event_name != 'pull_request' }}
+
tags: ${{ steps.meta.outputs.tags }}
+
labels: ${{ steps.meta.outputs.labels }}
+
cache-from: type=gha
+
cache-to: type=gha,mode=max
+
+
# - name: Docker Scout
+
# id: docker-scout
+
# if: ${{ github.event_name == 'pull_request' }}
+
# uses: docker/scout-action@v0.23.4
+
# with:
+
# dockerhub-user: ${{ secrets.DOCKERHUB_USER }}
+
# dockerhub-password: ${{ secrets.DOCKERHUB_PASSWORD }}
+
# command: compare
+
# # image: ${{ steps.meta.outputs.tags }}
+
# to: ${{ steps.repometa.outputs.REGISTRY_DOMAIN }}/${{ github.repository }}:${{ env.COMPARE_TAG }}
+
# ignore-unchanged: true
+
# write-comment: true
+
# github-token: ${{ secrets.GITHUB_TOKEN }} # to be able to write the comment