Browse Source

Update github-action

pull/109/head
Per-Arne Andersen 4 years ago
parent
commit
6456b05ce6
  1. 20
      .github/workflows/image.yml

20
.github/workflows/image.yml

@ -3,12 +3,16 @@ name: build and publish
on: on:
push: push:
branches: branches:
- 'dev' - '**'
jobs: jobs:
docker: docker:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
-
name: Branch-Name
uses: nelonoel/branch-name@v1
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -24,7 +28,18 @@ jobs:
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
-
if: github.ref == 'refs/heads/main'
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: perara/wg-manager:latest
if: github.ref == 'refs/heads/dev'
-
name: Build and push name: Build and push
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
@ -35,3 +50,4 @@ jobs:

Loading…
Cancel
Save