Skip to content

Release

Release #202

Workflow file for this run

name: Release
on:
create:
branches: [ main ]
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Generate version
if: startsWith(github.ref, 'refs/tags/')
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Adapt version
run: sed -i "s/fe2_reverseproxy:latest/fe2_reverseproxy:${RELEASE_VERSION}/" docker-compose.yml
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
docker-compose.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docker_buildx:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Generate version
if: startsWith(github.ref, 'refs/tags/')
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up QEMU environment
uses: docker/setup-qemu-action@v3.3.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.8.0
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3.3.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push all images
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v6.10.0
with:
context: .
platforms: |
linux/amd64
linux/arm64
push: ${{ github.event_name != 'pull_request' }}
build-args: BUILDX_QEMU_ENV=true
tags: odin568/fe2_reverseproxy:${{ env.RELEASE_VERSION }}