v1.3.2-beta.0 #31
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Container | |
on: | |
release: | |
types: [ published ] | |
env: | |
REGISTRY: ghcr.io | |
TCR_REGISTRY: ccr.ccs.tencentyun.com | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: ~1.21 | |
- run: | | |
go mod tidy | |
go build -o excel/main ./excel | |
go build -o schedule/main ./schedule | |
go build -o worker/main ./worker | |
env: | |
CGO_ENABLED: 0 | |
GO111MODULE: on | |
GOARCH: amd64 | |
GOOS: linux | |
- name: Login GitHub Container Hub | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login TCR | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.TCR_REGISTRY }} | |
username: ${{ secrets.TCR_USERNAME }} | |
password: ${{ secrets.TCR_PASSWORD }} | |
# Excel | |
- name: Get Excel Metadata | |
id: excel | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.REGISTRY }}/excel | |
- name: Push Excel | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./excel | |
push: true | |
tags: ${{ steps.excel.outputs.tags }} | |
labels: ${{ steps.excel.outputs.labels }} | |
- name: Copy Excel to QCLOUD TCR | |
uses: akhilerm/[email protected] | |
with: | |
src: ${{ env.REGISTRY }}/excel:${{steps.excel.outputs.version}} | |
dst: | | |
${{ env.TCR_REGISTRY }}/excel:latest | |
${{ env.TCR_REGISTRY }}/excel:${{steps.excel.outputs.version}} | |
# Schedule | |
- name: Get Schedule Metadata | |
id: schedule | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.REGISTRY }}/schedule | |
- name: Push Schedule | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./schedule | |
push: true | |
tags: ${{ steps.schedule.outputs.tags }} | |
labels: ${{ steps.schedule.outputs.labels }} | |
- name: Copy Schedule to QCLOUD TCR | |
uses: akhilerm/[email protected] | |
with: | |
src: ${{ env.REGISTRY }}/schedule:${{steps.schedule.outputs.version}} | |
dst: | | |
${{ env.TCR_REGISTRY }}/schedule:latest | |
${{ env.TCR_REGISTRY }}/schedule:${{steps.schedule.outputs.version}} | |
# Worker | |
- name: Get Worker Metadata | |
id: worker | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.REGISTRY }}/worker | |
- name: Push Worker | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./worker | |
push: true | |
tags: ${{ steps.worker.outputs.tags }} | |
labels: ${{ steps.worker.outputs.labels }} | |
- name: Copy Worker to QCLOUD TCR | |
uses: akhilerm/[email protected] | |
with: | |
src: ${{ env.REGISTRY }}/worker:${{steps.worker.outputs.version}} | |
dst: | | |
${{ env.TCR_REGISTRY }}/worker:latest | |
${{ env.TCR_REGISTRY }}/worker:${{steps.worker.outputs.version}} |