generated from clearbluejar/ghidra-python-vscode-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (56 loc) · 2.22 KB
/
build-and-push-devcontainer.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: 'build-and-push-devcontainer'
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
paths:
- '.devcontainer/**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: image_id
uses: pozetroninc/github-action-get-latest-release@master
with:
owner: clearbluejar
repo: ghidra-python-vscode-devcontainer-skeleton
excludes: prerelease, draft
- name: Install updated Skopeo
# This can be omitted once runner images have a version of Skopeo > 1.4.1
# See https://github.com/containers/skopeo/issues/1874
run: |
sudo apt purge buildah golang-github-containers-common podman skopeo
sudo apt autoremove --purge
REPO_URL="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable"
source /etc/os-release
sudo sh -c "echo 'deb ${REPO_URL}/x${NAME}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list"
sudo wget -qnv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${NAME}_${VERSION_ID}/Release.key -O Release.key
sudo apt-key add Release.key
sudo apt-get update
sudo apt-get install skopeo
# enables building of multi-platform images
- name: Create Docker Build Instance
run: |
docker buildx create --use
docker buildx ls
- name: Build dev container image
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/clearbluejar/ghidra-python-vscode-devcontainer
cacheFrom: ghcr.io/clearbluejar/ghidra-python-vscode-devcontainer
push: always
imageTag: latest,${{ steps.image_id.outputs.release }}
platform: linux/arm64,linux/amd64
runCmd: |
find .
find /ghidra