Release #188
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 | |
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.1.0 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3.4.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.4.1 | |
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 }} |