change action syntax

This commit is contained in:
Ilya Sosnovsky 2021-03-09 18:28:56 +03:00
parent 8fe289ad5f
commit 409377d014
2 changed files with 22 additions and 29 deletions

View File

@ -5,29 +5,26 @@ on:
jobs: jobs:
build: build:
name: Converge name: build latest images for relase
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Docker login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Push openvpn image to Docker Hub - name: Push openvpn image to Docker Hub
uses: docker/build-push-action@v1 uses: docker/build-push-action@v1
with: with:
tags: flant/openvpn-admin:openvpn-latest username: ${{ secrets.DOCKER_USER }}
context: . password: ${{ secrets.DOCKER_PASS }}
file: Dockerfile.openvpn repository: flant/openvpn-admin
push: true tags: openvpn-latest
dockerfile: Dockerfile.openvpn
- name: Push openvpn-admin image to Docker Hub - name: Push openvpn-admin image to Docker Hub
uses: docker/build-push-action@v1 uses: docker/build-push-action@v1
with: with:
tags: flant/openvpn-admin:latest username: ${{ secrets.DOCKER_USER }}
file: Dockerfile password: ${{ secrets.DOCKER_PASS }}
context: . repository: flant/openvpn-admin
push: true tags: latest
dockerfile: Dockerfile

View File

@ -6,33 +6,29 @@ on:
jobs: jobs:
build: build:
name: Converge name: build images for tag
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Docker login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Get the version - name: Get the version
id: get_version id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Push openvpn image to Docker Hub - name: Push openvpn image to Docker Hub
uses: docker/build-push-action@v1 uses: docker/build-push-action@v1
with: with:
tags: flant/openvpn-admin:openvpn-${{ steps.get_version.outputs.VERSION }} username: ${{ secrets.DOCKER_USER }}
context: . password: ${{ secrets.DOCKER_PASS }}
file: Dockerfile.openvpn repository: flant/openvpn-admin
push: true tags: openvpn-${{ steps.get_version.outputs.VERSION }}
dockerfile: Dockerfile.openvpn
- name: Push openvpn-admin image to Docker Hub - name: Push openvpn-admin image to Docker Hub
uses: docker/build-push-action@v1 uses: docker/build-push-action@v1
with: with:
tags: flant/openvpn-admin:${{ steps.get_version.outputs.VERSION }} username: ${{ secrets.DOCKER_USER }}
file: Dockerfile password: ${{ secrets.DOCKER_PASS }}
context: . repository: flant/openvpn-admin
push: true tags: ${{ steps.get_version.outputs.VERSION }}
dockerfile: Dockerfile