Update .github/workflows/main.yml
This commit is contained in:
parent
76a269de0a
commit
5e8abac7f7
1 changed files with 6 additions and 13 deletions
19
.github/workflows/main.yml
vendored
19
.github/workflows/main.yml
vendored
|
@ -17,17 +17,17 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: https://github.com/actions/checkout@v2
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v2
|
uses: https://github.com/docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.DOCKER_REGISTRY }}
|
registry: ${{ env.DOCKER_REGISTRY }}
|
||||||
username: ${{ env.DOCKER_USERNAME }}
|
username: ${{ env.DOCKER_USERNAME }}
|
||||||
password: ${{ env.DOCKER_PASSWORD }}
|
password: ${{ env.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Install cargo-semver
|
- name: Install cargo-semver
|
||||||
uses: actions-rs/install@v0.1.2
|
uses: https://github.com/actions-rs/install@v0.1.2
|
||||||
with:
|
with:
|
||||||
crate: cargo-get
|
crate: cargo-get
|
||||||
version: latest
|
version: latest
|
||||||
|
@ -37,10 +37,10 @@ jobs:
|
||||||
echo "VERSION=$(cargo get package.version --pretty)" >> $GITHUB_ENV
|
echo "VERSION=$(cargo get package.version --pretty)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: https://github.com/docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v4
|
uses: https://github.com/docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
|
@ -48,11 +48,4 @@ jobs:
|
||||||
${{ env.DOCKER_REGISTRY }}/captchuccino:latest
|
${{ env.DOCKER_REGISTRY }}/captchuccino:latest
|
||||||
${{ env.DOCKER_REGISTRY }}/captchuccino:${{ env.VERSION }}
|
${{ env.DOCKER_REGISTRY }}/captchuccino:${{ env.VERSION }}
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
|
||||||
- name: Deploy to production
|
|
||||||
uses: fjogeleit/http-request-action@v1.14.1
|
|
||||||
with:
|
|
||||||
url: ${{ format('{0}?TAG={1}',env.PORTAINER_API_WEBHOOK, env.VERSION) }}
|
|
||||||
method: 'POST'
|
|
||||||
preventFailureOnNoResponse: true
|
|
Loading…
Reference in a new issue