blob: 8efcc2d294ad097ce05bcd831e7814cfb9674e8c [file] [log] [blame]
Mohammed Nasera4e52902022-08-30 00:20:05 -04001name: test
2on:
3 pull_request: {}
Mohammed Naserf6880e22022-08-30 18:25:08 -04004concurrency:
5 group: ${{ github.head_ref }}
6 cancel-in-progress: true
Mohammed Nasera4e52902022-08-30 00:20:05 -04007
8jobs:
Mohammed Naserbd5667e2022-09-01 17:38:14 -04009 build-prometheus-ethtool-exporter:
10 runs-on: ubuntu-latest
11 steps:
12 - uses: actions/checkout@v3.0.2
13 with:
14 fetch-depth: 0
dependabot[bot]15743e02022-09-05 13:28:24 +000015 - uses: tj-actions/changed-files@v29.0.3
Mohammed Naserbd5667e2022-09-01 17:38:14 -040016 id: changed-files
17 with:
18 files: images/prometheus-ethtool-exporter/*
19 - uses: docker/setup-qemu-action@v2.0.0
20 if: steps.changed-files.outputs.any_changed == 'true'
21 - uses: docker/setup-buildx-action@v2.0.0
22 if: steps.changed-files.outputs.any_changed == 'true'
Mohammed Naser50dc73d2022-09-01 17:42:48 -040023 - run: echo PROJECT_REF=$(cat images/prometheus-ethtool-exporter/ref) >> $GITHUB_ENV
24 if: steps.changed-files.outputs.any_changed == 'true'
Mohammed Naserbd5667e2022-09-01 17:38:14 -040025 - uses: docker/login-action@v2.0.0
26 if: steps.changed-files.outputs.any_changed == 'true'
27 with:
28 registry: quay.io
29 username: ${{ secrets.QUAY_USERNAME }}
30 password: ${{ secrets.QUAY_ROBOT_TOKEN }}
31 - uses: docker/build-push-action@v3.1.1
32 if: steps.changed-files.outputs.any_changed == 'true'
33 with:
34 context: images/prometheus-ethtool-exporter
35 cache-from: type=gha,scope=prometheus-ethtool-exporter
36 cache-to: type=gha,mode=max,scope=prometheus-ethtool-exporter
37 platforms: linux/amd64,linux/arm64
38 push: true
39 build-args: |
Mohammed Naser50dc73d2022-09-01 17:42:48 -040040 PROJECT_REF=${{ env.PROJECT_REF }}
Mohammed Naserbd5667e2022-09-01 17:38:14 -040041 tags: |
Mohammed Naser50dc73d2022-09-01 17:42:48 -040042 quay.io/vexxhost/ethtool-exporter:${{ env.PROJECT_REF }}
Mohammed Naserbd5667e2022-09-01 17:38:14 -040043
Mohammed Naserd4e634d2022-08-30 18:46:03 -040044 molecule:
45 runs-on: ubuntu-latest
46 # needs:
47 # - build-openstack-images
48 steps:
49 - uses: actions/checkout@v3.0.2
50 # TODO: run cleanup
51 - uses: gofrolist/molecule-action@v2.2.38
52 env:
53 OS_AUTH_URL: https://auth.vexxhost.net/v3
54 OS_REGION_NAME: ca-ymq-1
55 OS_USER_DOMAIN_NAME: Default
56 OS_USERNAME: ${{ secrets.OS_USERNAME }}
57 OS_PASSWORD: ${{ secrets.OS_PASSWORD }}
58 OS_PROJECT_DOMAIN_NAME: Default
59 OS_PROJECT_NAME: ${{ secrets.OS_PROJECT_NAME }}
60