Update CI

This commit is contained in:
Paramtamtam 2021-07-20 15:03:19 +05:00
parent 93339d5159
commit bf160a071e
No known key found for this signature in database
GPG Key ID: 366371698FAD0A2B
2 changed files with 14 additions and 6 deletions

View File

@ -12,11 +12,18 @@ jobs:
- name: Check out code - name: Check out code
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Docker login in default registry - name: Login to default Container Registry
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_LOGIN }}" --password-stdin &> /dev/null uses: docker/login-action@v1 # Action page: <https://github.com/docker/login-action>
with:
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker login in ghcr.io # Auth docs: <https://git.io/JLDaw> - name: Login to GitHub Container Registry
run: echo "${{ secrets.GHCR_PASSWORD }}" | docker login ghcr.io -u tarampampam --password-stdin uses: docker/login-action@v1 # Action page: <https://github.com/docker/login-action>
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PASSWORD }}
- name: Generate image tag value - name: Generate image tag value
id: tag id: tag
@ -27,8 +34,8 @@ jobs:
docker build \ docker build \
--tag "tarampampam/3proxy:${{ steps.tag.outputs.value }}" \ --tag "tarampampam/3proxy:${{ steps.tag.outputs.value }}" \
--tag "tarampampam/3proxy:latest" \ --tag "tarampampam/3proxy:latest" \
--tag "ghcr.io/tarampampam/3proxy:${{ steps.tag.outputs.value }}" \ --tag "ghcr.io/${{ github.actor }}/3proxy:${{ steps.tag.outputs.value }}" \
--tag "ghcr.io/tarampampam/3proxy:latest" \ --tag "ghcr.io/${{ github.actor }}/3proxy:latest" \
-f ./Dockerfile . -f ./Dockerfile .
- name: Push into default registry - name: Push into default registry

View File

@ -34,6 +34,7 @@ jobs: # Docs: <https://git.io/JvxXE>
with: with:
name: docker-image name: docker-image
path: ./docker-image.tar path: ./docker-image.tar
retention-days: 1
try-to-use: try-to-use:
name: Build and use docker image (auth ${{ matrix.auth }}) name: Build and use docker image (auth ${{ matrix.auth }})