Skip to content

Merge pull request #697 from l1b0k/fix/maxip #1323

Merge pull request #697 from l1b0k/fix/maxip

Merge pull request #697 from l1b0k/fix/maxip #1323

Workflow file for this run

name: build
on:
push:
branches: [main]
tags:
- 'v*'
pull_request:
branches: [main]
env:
REGISTRY: ghcr.io
OWNER: AliyunContainerService
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after }}
cancel-in-progress: true
jobs:
build-terway:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.OWNER }}/terway
tags: |
type=raw,value={{date 'YYYYMMDD'}}-{{sha}}
type=semver,pattern={{version}}
type=semver,pattern={{raw}}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.event_name != 'pull_request' && github.event.action != 'unassigned' }}
- name: Build
run: |
make build
- name: Build and push
run: |
make REGISTRY=ghcr.io/aliyuncontainerservice build-push
if: ${{ github.event_name != 'pull_request' && github.event.action != 'unassigned' }}