Skip to content

Commit

Permalink
Merge pull request #16 from amnezia-vpn/pipeline
Browse files Browse the repository at this point in the history
Add pipeline
  • Loading branch information
tiaga authored Feb 7, 2024
2 parents 7155d20 + cbd414d commit 9195025
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build-if-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: build-if-tag

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

env:
APP: amneziawg-go

jobs:
build:
runs-on: ubuntu-latest
name: build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Setup metadata
uses: docker/metadata-action@v5
id: metadata
with:
images: amneziavpn/${{ env.APP }}
tags: type=semver,pattern={{version}}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.metadata.outputs.tags }}

0 comments on commit 9195025

Please sign in to comment.