Skip to content

chore(update): golang v1.23.6 + cloudflared v2025.2.0 #39

chore(update): golang v1.23.6 + cloudflared v2025.2.0

chore(update): golang v1.23.6 + cloudflared v2025.2.0 #39

Workflow file for this run

name: CI
on:
push:
tags:
- '*'
workflow_call:
inputs:
platforms:
required: false
type: string
secrets:
DOCKERHUB_TOKEN:
required: true
GOSS_CMD:
required: false
env:
DOCKERHUB_USERNAME: ${{ vars.DOCKERHUB_USERNAME }}
DOCKERHUB_REPOSITORY: ${{ vars.DOCKERHUB_REPOSITORY }}
DOCKERHUB_PLATFORMS: ${{ inputs.platforms || 'linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64' }}
jobs:
test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Build ${{ env.DOCKERHUB_REPOSITORY }}:dev image
run: docker build -t ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPOSITORY }}:dev .
- uses: e1himself/[email protected]
with:
version: 'v0.4.9'
- name: Execute dgoss run on ${{ env.DOCKERHUB_REPOSITORY }}:dev image
env:
GOSS_FILES_STRATEGY: cp
run: dgoss run ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPOSITORY }}:dev ${{ secrets.GOSS_CMD }}
deploy:
needs: test
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: docker/[email protected]
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Build and push ${{ env.DOCKERHUB_REPOSITORY }} image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: ${{ env.DOCKERHUB_PLATFORMS }}
push: true
tags: |
${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPOSITORY }}:latest
${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPOSITORY }}:${{ github.ref_name }}
cache-from: type=registry,ref=${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPOSITORY }}:buildcache
cache-to: type=registry,ref=${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPOSITORY }}:buildcache,mode=max
- name: Generate CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
- name: Create github ${{ github.ref_name }} release
uses: ncipollo/release-action@v1
with:
makeLatest: true
allowUpdates: true
body: ${{ steps.changelog.output.changes }}
token: ${{ github.token }}
- name: Commit updated CHANGELOG.md for ${{ github.ref_name }}
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: main
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]'
file_pattern: CHANGELOG.md