Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[github] Upgrade to actions/[upload,download]-artifact v4 #6698

Merged
merged 1 commit into from
May 8, 2024

Conversation

jesserockz
Copy link
Member

@jesserockz jesserockz commented May 8, 2024

What does this implement/fix?

The v4 releases of these actions changed the artifacts to be immutable so this new set-up works.

Tested in a separate repo with the following workflow
name: Test

on:
  pull_request:

permissions:
  contents: read

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        platform:
          - amd64
          - armv7
          - arm64
    steps:
      - run: mkdir -p /tmp/digests/{ghcr,dockerhub}/{docker,hassio,lint}
      - run: touch /tmp/digests/ghcr/docker/${{ matrix.platform }}
      - run: touch /tmp/digests/dockerhub/docker/${{ matrix.platform }}
      - run: touch /tmp/digests/ghcr/hassio/${{ matrix.platform }}
      - run: touch /tmp/digests/dockerhub/hassio/${{ matrix.platform }}
      - run: touch /tmp/digests/ghcr/lint/${{ matrix.platform }}
      - run: touch /tmp/digests/dockerhub/lint/${{ matrix.platform }}

      - uses: actions/upload-artifact@v4.3.3
        with:
          name: digests-${{ matrix.platform }}
          path: /tmp/digests

  manifest:
    runs-on: ubuntu-latest
    needs: build
    strategy:
      fail-fast: false
      matrix:
        image:
          - title: "ha-addon"
            target: "hassio"
            suffix: "hassio"
          - title: "docker"
            target: "docker"
            suffix: ""
          - title: "lint"
            target: "lint"
            suffix: "lint"
        registry:
          - ghcr
          - dockerhub

    steps:
      - uses: actions/download-artifact@v4.1.7
        with:
          pattern: digests-*
          path: /tmp/digests
          merge-multiple: true

      - working-directory: /tmp/digests
        run: |-
          tree

Which yielded the following output:

> Run tree
.
├── dockerhub
│   ├── docker
│   │   ├── amd64
│   │   ├── arm64
│   │   └── armv7
│   ├── hassio
│   │   ├── amd64
│   │   ├── arm64
│   │   └── armv7
│   └── lint
│       ├── amd64
│       ├── arm64
│       └── armv7
└── ghcr
    ├── docker
    │   ├── amd64
    │   ├── arm64
    │   └── armv7
    ├── hassio
    │   ├── amd64
    │   ├── arm64
    │   └── armv7
    └── lint
        ├── amd64
        ├── arm64
        └── armv7

Closes #6603 and closes #6626

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Related issue or feature (if applicable): fixes

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040
  • BK72xx
  • RTL87xx

Example entry for config.yaml:

# Example config.yaml

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

@jesserockz jesserockz added this to the 2024.5.0b2 milestone May 8, 2024
@jesserockz jesserockz changed the title Upgrade to actions/{upload,download}-artifact v4 [github] Upgrade to actions/{upload,download}-artifact v4 May 8, 2024
@jesserockz jesserockz merged commit 7764ab2 into dev May 8, 2024
56 checks passed
@jesserockz jesserockz deleted the jesserockz-2024-163 branch May 8, 2024 04:17
@jesserockz jesserockz changed the title [github] Upgrade to actions/{upload,download}-artifact v4 [github] Upgrade to actions/[upload,download]-artifact v4 May 9, 2024
@jesserockz jesserockz mentioned this pull request May 9, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant