File: build_binary_from_ref.yml

package info (click to toggle)
receptor 1.5.5-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,772 kB
  • sloc: python: 1,643; makefile: 305; sh: 174
file content (41 lines) | stat: -rw-r--r-- 1,230 bytes parent folder | download | duplicates (2)
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
---
name: "Build binary from arbitratry repo / ref"
on:  # yamllint disable-line rule:truthy
  workflow_dispatch:
    inputs:
      repository:
        description: 'The receptor repository to build from.'
        required: true
        default: 'ansible/receptor'
      ref:
        description: 'The ref to build. Can be a branch or any other valid ref.'
        required: true
        default: 'devel'
jobs:
  build:
    name: build
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          repository: ${{ github.event.inputs.repository }}
          ref: ${{ github.event.inputs.ref }}

      - name: Set up Go
        uses: actions/setup-go@v5
        with:
          go-version: "1.22"

      - name: build-all target
        run: make receptor

      - name: Upload binary
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
        run: |
          pip install boto3
          ansible -i localhost, -c local all -m aws_s3 \
            -a "bucket=receptor-nightlies object=refs/${{ github.event.inputs.ref }}/receptor src=./receptor mode=put"