Skip to content

Commit

Permalink
Try to inherit secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
Soubinan committed Mar 9, 2024
1 parent 5074aa7 commit e33caf6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-homarr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ jobs:
architecture: ${{matrix.architectures}}
branch_name: ${{github.event.pull_request.base.ref}}
is_merged: ${{github.event.pull_request.merged}}
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/build-tester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ jobs:
architecture: ${{matrix.architectures}}
branch_name: dev
is_merged: false
secrets: inherit
22 changes: 12 additions & 10 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ on:
is_merged:
required: true
type: boolean
secrets:
HOMELAB_LXC_EP:
required: true
HOMELAB_LXC_TOKEN:
required: true
RCLONE_CONFIG:
required: true
RCLONE_CONFIG_PASS:
required: true

jobs:
image-build:
Expand Down Expand Up @@ -61,23 +70,16 @@ jobs:
if: github.event_name == 'schedule' || (inputs.branch_name == 'main' && inputs.is_merged == true)
run: |
cat << EOF > /tmp/rclone.conf
[cloudflare]
type = s3
provider = Cloudflare
access_key_id = $R2_ACCESS_KEY_ID
secret_access_key = $R2_SECRET_ACCESS_KEY
endpoint = $R2_ENDPOINT
region = auto
$RCLONE_CONFIG
EOF
echo
rclone copy ./${{inputs.app_name}}-${{inputs.app_version}}-${{inputs.architecture}}-root.tar.xz cloudflare:lxc-images --config /tmp/rclone.conf
rclone copy ./${{inputs.app_name}}-${{inputs.app_version}}-${{inputs.architecture}}-meta.tar.xz cloudflare:lxc-images --config /tmp/rclone.conf
echo
echo 'LXC Image published successfully !'
env:
R2_ACCESS_KEY_ID: ${{secrets.R2_ACCESS_KEY_ID}}
R2_SECRET_ACCESS_KEY: ${{secrets.R2_SECRET_ACCESS_KEY}}
R2_ENDPOINT: ${{secrets.R2_ENDPOINT}}
RCLONE_CONFIG: ${{secrets.RCLONE_CONFIG}}
RCLONE_CONFIG_PASS: ${{secrets.RCLONE_CONFIG_PASS}}

- name: Publish build info
if: github.event_name == 'schedule' || (inputs.branch_name == 'main' && inputs.is_merged == true)
Expand Down

0 comments on commit e33caf6

Please sign in to comment.