-
Notifications
You must be signed in to change notification settings - Fork 73
61 lines (59 loc) · 2.03 KB
/
Copy pathcode.yaml
File metadata and controls
61 lines (59 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Repository Code Sync
on:
push:
branches:
- 'main'
workflow_dispatch:
branches:
- 'main'
jobs:
sync-installers:
# Disable bidirectional sync
if: false # github.repository == 'hashicorp/vagrant-builders'
runs-on: ['self-hosted', 'ondemand', 'linux', 'type=t3.small']
permissions:
id-token: write
contents: read
steps:
- name: Authentication
id: vault-auth
run: vault-auth
- name: Secrets
id: secrets
uses: hashicorp/vault-action@v2
with:
url: ${{ steps.vault-auth.outputs.addr }}
caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }}
token: ${{ steps.vault-auth.outputs.token }}
secrets:
kv/data/teams/vagrant/slack webhook | slack_webhook;
kv/data/teams/vagrant/hashibot token | hashibot_token;
kv/data/teams/vagrant/hashibot username | hashibot_username;
- name: Code Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
fetch-depth: 0
- name: Sync Installers Repository
run: ./.ci/sync.sh
working-directory: ${{github.workspace}}
env:
HASHIBOT_TOKEN: ${{ steps.secrets.outputs.hashibot_token }}
HASHIBOT_USERNAME: ${{ steps.secrets.outputs.hashibot_username }}
SLACK_WEBHOOK: ${{ steps.secrets.outputs.slack_webhook }}
sync-builders:
if: github.repository == 'hashicorp/vagrant-installers'
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
fetch-depth: 0
- name: Sync Builders Repository
run: ./.ci/sync.sh
working-directory: ${{github.workspace}}
env:
HASHIBOT_TOKEN: ${{ secrets.HASHIBOT_TOKEN }}
HASHIBOT_USERNAME: ${{ vars.HASHIBOT_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}