Skip to content

Commit 17588be

Browse files
committed
Separate action to build single-arch docker image for github packages.
1 parent 27df1a8 commit 17588be

File tree

2 files changed

+33
-7
lines changed

2 files changed

+33
-7
lines changed

.github/workflows/deploy.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,9 @@ jobs:
4444
- name: Docker Login and set build command
4545
if: success()
4646
id: login
47-
env:
48-
GITHUB_USERNAME: ${{ github.actor }}
49-
GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
50-
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
51-
DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }}
5247
run: |
53-
echo "${GITHUB_PASSWORD}" | docker login --username "${GITHUB_USERNAME}" --password-stdin docker.pkg.github.com
54-
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin docker.io
48+
# echo "${{ secrets.GITHUB_TOKEN }}" | docker login -u "${{ github.actor }}" --password-stdin docker.io
49+
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin docker.io
5550
echo ::set-output name=buildx::$(echo docker buildx build --output type=image,push=true \
5651
--platform ${{ steps.prepare.outputs.docker_platforms }} --cache-from "type=local,src=/tmp/.buildx-cache" --cache-to "type=local,dest=/tmp/.buildx-cache" \
5752
--tag "${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}")

.github/workflows/github_pkg.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish Docker Image to GitHub
2+
on:
3+
push:
4+
branches:
5+
- "submodules"
6+
- "master"
7+
8+
jobs:
9+
push_to_registry:
10+
name: Push Docker image to GitHub Packages
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
with:
16+
ref: ${{ github.head_ref }}
17+
fetch-depth: 1
18+
persist-credentials: false
19+
submodules: recursive
20+
- name: Checkout submodules
21+
uses: textbook/git-checkout-submodule-action@master
22+
with:
23+
remote: true
24+
- name: Push to GitHub Packages
25+
uses: docker/build-push-action@v1
26+
with:
27+
username: ${{ github.actor }}
28+
password: ${{ secrets.GITHUB_TOKEN }}
29+
registry: docker.pkg.github.com
30+
repository: miigotu/ps3toolchain/ps3dev
31+
tag_with_ref: true

0 commit comments

Comments
 (0)