mirror of
https://github.com/dani-garcia/bw_web_builds.git
synced 2024-12-27 04:48:17 +03:00
6529f1dab0
- Updated web-vault to v2022.05.0 - Made several changes to the build scripts for ease of building/patching etc... You can now run `make checkout` to pull/update the repo to the wanted version There is also a `make patch-web-vault` to patch the repo A `make generate-patch` to create a patch file from the current changes And many more changes
41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v[0-9]+.[0-9]+.[0-9]+[a-z]?'
|
|
|
|
jobs:
|
|
docker-build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 # v1.10.0
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
# Determine Docker Tag
|
|
- name: Init Variables
|
|
id: vars
|
|
shell: bash
|
|
run: |
|
|
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
|
|
echo "set-output name=DOCKER_TAG::${GITHUB_REF#refs/*/}"
|
|
echo "::set-output name=DOCKER_TAG::${GITHUB_REF#refs/*/}"
|
|
elif [[ "${{ github.ref }}" == refs/heads/* ]]; then
|
|
echo "set-output name=DOCKER_TAG::testing"
|
|
echo "::set-output name=DOCKER_TAG::testing"
|
|
fi
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@a66e35b9cbcf4ad0ea91ffcaf7bbad63ad9e0229 # v2.7.0
|
|
with:
|
|
context: .
|
|
push: true
|
|
# secrets.DOCKERHUB_REPO needs to be '<user>/<repo>', for example 'vaultwarden/web-vault'
|
|
tags: "${{ secrets.DOCKERHUB_REPO }}:${{ steps.vars.outputs.DOCKER_TAG }}"
|
|
|