Skip to content

keep order files were posted #109

keep order files were posted

keep order files were posted #109

Workflow file for this run

name: Server
on:
push:
paths-ignore:
- "*.md"
- "cmd/**"
- "cli/**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha,prefix=
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare Version Info
run: |
echo "VERSION=$(git describe --tags)" >> $GITHUB_ENV
echo "COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
echo "BUILD_TIME=$(date --rfc-3339=seconds)" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ env.VERSION }}
COMMIT=${{ env.COMMIT }}
BUILD_TIME=${{ env.BUILD_TIME }}
deploy:
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Deploy
uses: fjogeleit/http-request-action@v1
with:
url: "https://watchtower.topi.wtf/v1/update?image=ghcr.io/topi314/gobin"
method: "POST"
timeout: 60000
customHeaders: '{"Authorization": "Bearer ${{ secrets.TOKEN }}"}'