mostafabarmshory build new image #3
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: publishpublish | |
run-name: ${{ github.actor }} build new image | |
on: [push] | |
jobs: | |
publish-postgres-image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build the Postgres 13 Docker image | |
run: | | |
timetag=(`date +%Y%M%d`) | |
docker build . --tag ghcr.io/odoonix/postgres:13.${timetag} --tag ghcr.io/odoonix/postgres:13 | |
docker push ghcr.io/odoonix/postgres:13 | |
docker push ghcr.io/odoonix/postgres:13.${timetag} |