Skip to content

Commit

Permalink
Use environments which have the secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
LordRalex committed Nov 1, 2023
1 parent 666998b commit 07b0473
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ name: Build
on:
push:
branches:
- master
- v2
tags:
- v2.*
- v3.*
paths-ignore:
- '.github/workflows/release.yml'
- '.github/workflows/pr.yml'
Expand Down Expand Up @@ -478,6 +477,8 @@ jobs:
matrix:
platform: ["linux/amd64"]

environment: Release

timeout-minutes: 10

steps:
Expand Down Expand Up @@ -513,8 +514,8 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Build master container
uses: docker/build-push-action@v2
Expand All @@ -537,6 +538,8 @@ jobs:

timeout-minutes: 5

environment: Release

strategy:
matrix:
platform: [ "linux/amd64" ]
Expand Down Expand Up @@ -574,8 +577,8 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Build container
uses: docker/build-push-action@v3
Expand All @@ -597,6 +600,8 @@ jobs:
REPO: pufferpanel/pufferpanel
VERSION: devel

environment: Release

timeout-minutes: 5

strategy:
Expand Down Expand Up @@ -637,8 +642,8 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Build container
uses: docker/build-push-action@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
deploy:
runs-on: ubuntu-20.04
name: "Deployment"
environment: Release

steps:
- uses: ruby/setup-ruby@v1
Expand Down

0 comments on commit 07b0473

Please sign in to comment.