-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (32 loc) · 1.06 KB
/
publish-image.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
name: Pre-Build Image
on:
release:
types: [released]
env:
IMAGE: 'quay.io/heubeck/deploy-google-cloud-run-action:${{ github.event.release.tag_name }}'
jobs:
build:
name: Build action image
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Image build and push
env:
QUAY_USER: ${{ secrets.QUAY_USER }}
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
run: |
docker build . -f Dockerfile -t "$IMAGE"
docker login -u="$QUAY_USER" -p="$QUAY_PASSWORD" quay.io
docker push "$IMAGE"
echo "FROM $IMAGE" > Dockerfile
git config --local user.email "p1nkun1c@rns"
git config --local user.name "yours sincerely CI"
git add Dockerfile
git commit -m "Update latest image"
- name: Refresh latest action branch
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: 'action'
force: true