Skip to content

Commit

Permalink
docker.io doesn’t want to behave today
Browse files Browse the repository at this point in the history
  • Loading branch information
madninja committed Nov 11, 2023
1 parent 93c656a commit 3b9e233
Showing 1 changed file with 69 additions and 69 deletions.
138 changes: 69 additions & 69 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ jobs:
- aarch64-unknown-linux-musl
- mips-unknown-linux-musl
- mipsel-unknown-linux-musl
- x86_64-unknown-debian-gnu
- x86_64-tpm-debian-gnu
# - x86_64-unknown-debian-gnu
# - x86_64-tpm-debian-gnu

steps:
- name: Setup | Cancel Previous Runs
Expand Down Expand Up @@ -128,70 +128,70 @@ jobs:
**/helium-gateway-*.tar.gz
name: ${{github.ref_name}}

docker_buildx:
# Ensure we don't publish images until we pass clippy.
needs: [hygiene]
runs-on: ubuntu-22.04
steps:
- name: Setup | Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}

- name: Setup | Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup | Docker
uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64

- name: Setup | Quay.io
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_MINER_USER }}
password: ${{ secrets.QUAY_MINER_UPLOAD_TOKEN }}

- name: Setup | Image Tag
if: github.event_name == 'pull_request'
run: echo "image_tag=PR${{ github.event.pull_request.number }}-$(git rev-parse --short ${{ github.event.pull_request.head.sha }})" >> $GITHUB_ENV

- name: Setup | Image Tag
if: github.event_name != 'pull_request'
run: echo "image_tag=$(git describe)" >> $GITHUB_ENV

# We publish all builds to the test-images repo.
- name: Build | Test Image
uses: docker/build-push-action@v3
env:
# The attestation manifests cause build errors for some makers.
# See https://github.com/helium/gateway-rs/issues/409
BUILDX_NO_DEFAULT_ATTESTATIONS: 1
with:
push: true
platforms: linux/amd64,linux/arm64
labels: VERSION=${{ env.image_tag }}
tags: quay.io/team-helium/test-images:gateway-${{ env.image_tag }}
cache-from: type=gha
cache-to: type=gha,mode=max

# Publish to miner quay-repo on release only.
- name: Build | Release Image
if: startsWith(github.ref, 'refs/tags')
uses: docker/build-push-action@v3
env:
# The attestation manifests cause build errors for some makers.
# See https://github.com/helium/gateway-rs/issues/409
BUILDX_NO_DEFAULT_ATTESTATIONS: 1
with:
push: true
platforms: linux/amd64,linux/arm64
labels: VERSION=${{ github.ref_name }}
tags: |
quay.io/team-helium/miner:gateway-${{ github.ref_name }}
quay.io/team-helium/miner:gateway-latest
cache-from: type=gha
cache-to: type=gha,mode=max
# docker_buildx:
# # Ensure we don't publish images until we pass clippy.
# needs: [hygiene]
# runs-on: ubuntu-22.04
# steps:
# - name: Setup | Cancel Previous Runs
# uses: styfle/cancel-workflow-action@0.11.0
# with:
# access_token: ${{ github.token }}

# - name: Setup | Checkout
# uses: actions/checkout@v3
# with:
# fetch-depth: 0

# - name: Setup | Docker
# uses: docker/setup-buildx-action@v2
# with:
# platforms: linux/amd64,linux/arm64

# - name: Setup | Quay.io
# uses: docker/login-action@v2
# with:
# registry: quay.io
# username: ${{ secrets.QUAY_MINER_USER }}
# password: ${{ secrets.QUAY_MINER_UPLOAD_TOKEN }}

# - name: Setup | Image Tag
# if: github.event_name == 'pull_request'
# run: echo "image_tag=PR${{ github.event.pull_request.number }}-$(git rev-parse --short ${{ github.event.pull_request.head.sha }})" >> $GITHUB_ENV

# - name: Setup | Image Tag
# if: github.event_name != 'pull_request'
# run: echo "image_tag=$(git describe)" >> $GITHUB_ENV

# # We publish all builds to the test-images repo.
# - name: Build | Test Image
# uses: docker/build-push-action@v3
# env:
# # The attestation manifests cause build errors for some makers.
# # See https://github.com/helium/gateway-rs/issues/409
# BUILDX_NO_DEFAULT_ATTESTATIONS: 1
# with:
# push: true
# platforms: linux/amd64,linux/arm64
# labels: VERSION=${{ env.image_tag }}
# tags: quay.io/team-helium/test-images:gateway-${{ env.image_tag }}
# cache-from: type=gha
# cache-to: type=gha,mode=max

# # Publish to miner quay-repo on release only.
# - name: Build | Release Image
# if: startsWith(github.ref, 'refs/tags')
# uses: docker/build-push-action@v3
# env:
# # The attestation manifests cause build errors for some makers.
# # See https://github.com/helium/gateway-rs/issues/409
# BUILDX_NO_DEFAULT_ATTESTATIONS: 1
# with:
# push: true
# platforms: linux/amd64,linux/arm64
# labels: VERSION=${{ github.ref_name }}
# tags: |
# quay.io/team-helium/miner:gateway-${{ github.ref_name }}
# quay.io/team-helium/miner:gateway-latest
# cache-from: type=gha
# cache-to: type=gha,mode=max

0 comments on commit 3b9e233

Please sign in to comment.