Upgrade callgraphs (#11) #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'build-and-push-devcontainer' | |
on: # rebuild when devcontainer is updated | |
push: | |
paths: | |
- '.devcontainer/**' | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build-pypi-latest-push-docker: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- name: Checkout (GitHub) | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3 | |
- name: Get Version For Tag | |
id: get_version | |
run: | | |
pip install ghidrecomp | |
version=$(ghidrecomp -v) | |
echo "ghidrecomp_ver=$version" >> $GITHUB_OUTPUT | |
echo $ghidrecomp_ver | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
${{ github.repository }} | |
ghcr.io/${{ github.repository }} | |
- name: Set up QEMU for multi-architecture builds | |
uses: docker/setup-qemu-action@v2 | |
- name: Setup Docker buildx for multi-architecture builds | |
uses: docker/setup-buildx-action@v2 | |
with: | |
use: true | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker Login | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push ghidrecomp Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: .devcontainer | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: | | |
${{ github.repository }} | |
${{ github.repository }}:latest | |
ghcr.io/${{ github.repository }}:${{ steps.get_version.outputs.ghidrecomp_ver}} | |
ghcr.io/${{ github.repository }}:latest | |
platforms: linux/amd64,linux/arm64 | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
labels: ${{ steps.meta.outputs.labels }} |